From a61a38d6c435646b925c26de0dbc0e6cc1641577 Mon Sep 17 00:00:00 2001 From: pszafer Date: Tue, 9 Apr 2024 21:12:00 +0200 Subject: [PATCH] fix too many out_16 --- boards/8_covers_16_output.yaml | 9 --------- boneio-cover_mix_lights_v0_5-v0_6.yaml | 15 +++++++++------ boneio-cover_mix_lights_v0_7.yaml | 15 +++++++++------ boneio-cover_mix_switches_v0_5-v0_6.yaml | 14 ++++++++------ boneio-cover_mix_switches_v0_7.yaml | 15 +++++++++------ devices_v0_5-v0_6/pcf_with_mcp.yaml | 20 ++++++++++++++++++++ 6 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 devices_v0_5-v0_6/pcf_with_mcp.yaml diff --git a/boards/8_covers_16_output.yaml b/boards/8_covers_16_output.yaml index 685c2ed..f66ec18 100644 --- a/boards/8_covers_16_output.yaml +++ b/boards/8_covers_16_output.yaml @@ -184,15 +184,6 @@ switch: restore_mode: always off output: - - platform: gpio - id: out_16 - pin: - pcf8574: pcf_right - number: 8 - mode: - output: true - inverted: true - - platform: gpio id: out_17 pin: diff --git a/boneio-cover_mix_lights_v0_5-v0_6.yaml b/boneio-cover_mix_lights_v0_5-v0_6.yaml index 9cac7e2..71b919a 100644 --- a/boneio-cover_mix_lights_v0_5-v0_6.yaml +++ b/boneio-cover_mix_lights_v0_5-v0_6.yaml @@ -181,10 +181,6 @@ cover: - switch.turn_off: cover_close_08_out16 light: - - platform: binary - name: 'Light 16' - output: out_16 - id: light_16 - platform: binary name: 'Light 17' output: out_17 @@ -249,6 +245,7 @@ light: name: 'Light 32' output: out_32 id: light_32 + binary_sensor: - platform: gpio name: 'IN_01' @@ -485,7 +482,10 @@ binary_sensor: inverted: true on_press: then: - - light.toggle: light_15 + - cover.open: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_16' @@ -498,7 +498,10 @@ binary_sensor: inverted: true on_press: then: - - light.toggle: light_16 + - cover.close: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_17' diff --git a/boneio-cover_mix_lights_v0_7.yaml b/boneio-cover_mix_lights_v0_7.yaml index ef62231..7db99f1 100644 --- a/boneio-cover_mix_lights_v0_7.yaml +++ b/boneio-cover_mix_lights_v0_7.yaml @@ -177,10 +177,6 @@ cover: - switch.turn_off: cover_close_08_out16 light: - - platform: binary - name: 'Light 16' - output: out_16 - id: light_16 - platform: binary name: 'Light 17' output: out_17 @@ -245,6 +241,7 @@ light: name: 'Light 32' output: out_32 id: light_32 + binary_sensor: - platform: gpio name: 'IN_01' @@ -481,7 +478,10 @@ binary_sensor: inverted: true on_press: then: - - light.toggle: light_15 + - cover.open: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_16' @@ -494,7 +494,10 @@ binary_sensor: inverted: true on_press: then: - - light.toggle: light_16 + - cover.close: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_17' diff --git a/boneio-cover_mix_switches_v0_5-v0_6.yaml b/boneio-cover_mix_switches_v0_5-v0_6.yaml index 7ffffcc..31e0b96 100644 --- a/boneio-cover_mix_switches_v0_5-v0_6.yaml +++ b/boneio-cover_mix_switches_v0_5-v0_6.yaml @@ -181,10 +181,6 @@ cover: - switch.turn_off: cover_close_08_out16 switch: - - platform: output - name: 'Switch 16' - output: out_16 - id: switch_16 - platform: output name: 'Switch 17' output: out_17 @@ -485,7 +481,10 @@ binary_sensor: inverted: true on_press: then: - - switch.toggle: switch_15 + - cover.open: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_16' @@ -498,7 +497,10 @@ binary_sensor: inverted: true on_press: then: - - switch.toggle: switch_16 + - cover.close: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_17' diff --git a/boneio-cover_mix_switches_v0_7.yaml b/boneio-cover_mix_switches_v0_7.yaml index c769120..78dfb8b 100644 --- a/boneio-cover_mix_switches_v0_7.yaml +++ b/boneio-cover_mix_switches_v0_7.yaml @@ -177,10 +177,6 @@ cover: - switch.turn_off: cover_close_08_out16 switch: - - platform: output - name: 'Switch 16' - output: out_16 - id: switch_16 - platform: output name: 'Switch 17' output: out_17 @@ -245,6 +241,7 @@ switch: name: 'Switch 32' output: out_32 id: switch_32 + binary_sensor: - platform: gpio name: 'IN_01' @@ -481,7 +478,10 @@ binary_sensor: inverted: true on_press: then: - - switch.toggle: switch_15 + - cover.open: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_16' @@ -494,7 +494,10 @@ binary_sensor: inverted: true on_press: then: - - switch.toggle: switch_16 + - cover.close: cover_08 + on_release: + then: + - cover.stop: cover_08 - platform: gpio name: 'IN_17' diff --git a/devices_v0_5-v0_6/pcf_with_mcp.yaml b/devices_v0_5-v0_6/pcf_with_mcp.yaml new file mode 100644 index 0000000..76d6a9d --- /dev/null +++ b/devices_v0_5-v0_6/pcf_with_mcp.yaml @@ -0,0 +1,20 @@ +pcf8574: + - id: 'pcf_inputs_1to14' + i2c_id: bus_a + address: 0x20 + pcf8575: true + - id: 'pcf_inputs_15to28' + i2c_id: bus_a + address: 0x21 + pcf8575: true + - id: 'pcf_inputs_28to35_menu' + i2c_id: bus_a + address: 0x22 + pcf8575: false +mcp23017: + - id: 'mcp_left' + address: 0x21 + i2c_id: bus_b + - id: 'mcp_right' + address: 0x20 + i2c_id: bus_b