diff --git a/athom-1gang-switch.yaml b/athom-1gang-switch.yaml index 1b06bf4..86736ac 100644 --- a/athom-1gang-switch.yaml +++ b/athom-1gang-switch.yaml @@ -10,7 +10,7 @@ substitutions: # Project Name project_name: "China Athom Technology.1Gang Switch" # Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version - project_version: "v3.0.3" + project_version: "v3.0.4" # Restore the relay (GPO switch) upon reboot to state: light_restore_mode: RESTORE_DEFAULT_OFF # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) @@ -37,7 +37,7 @@ esphome: comment: "${device_description}" area: "${room}" name_add_mac_suffix: true - min_version: 2026.6.0 + min_version: 2026.7.0 project: name: "${project_name}" version: "${project_version}" @@ -207,6 +207,8 @@ binary_sensor: name: "Button" id: button1 disabled_by_default: true + filters: + - delayed_on_off: 20ms on_multi_click: - timing: - ON for at most 0.5s diff --git a/athom-2gang-switch.yaml b/athom-2gang-switch.yaml index b834a55..7f8a81b 100644 --- a/athom-2gang-switch.yaml +++ b/athom-2gang-switch.yaml @@ -10,7 +10,7 @@ substitutions: # Project Name project_name: "China Athom Technology.2Gang Switch" # Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version - project_version: "v3.0.3" + project_version: "v3.0.4" # Restore the relay (GPO switch) upon reboot to state: light1_restore_mode: RESTORE_DEFAULT_OFF light2_restore_mode: RESTORE_DEFAULT_OFF @@ -38,7 +38,7 @@ esphome: comment: "${device_description}" area: "${room}" name_add_mac_suffix: true - min_version: 2026.6.0 + min_version: 2026.7.0 project: name: "${project_name}" version: "${project_version}" @@ -210,6 +210,8 @@ binary_sensor: name: "Button1" id: button1 disabled_by_default: true + filters: + - delayed_on_off: 20ms on_multi_click: - timing: - ON for at most 0.5s @@ -231,10 +233,18 @@ binary_sensor: name: "Button2" id: button2 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light2 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light2 + - timing: + - ON for at least 4s + then: + - button.press: Reset sensor: - platform: uptime diff --git a/athom-3gang-switch.yaml b/athom-3gang-switch.yaml index 78d0ec6..1727403 100644 --- a/athom-3gang-switch.yaml +++ b/athom-3gang-switch.yaml @@ -10,7 +10,7 @@ substitutions: # Project Name project_name: "China Athom Technology.3Gang Switch" # Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version - project_version: "v3.0.3" + project_version: "v3.0.4" # Restore the relay (GPO switch) upon reboot to state: light1_restore_mode: RESTORE_DEFAULT_OFF light2_restore_mode: RESTORE_DEFAULT_OFF @@ -39,7 +39,7 @@ esphome: comment: "${device_description}" area: "${room}" name_add_mac_suffix: true - min_version: 2026.6.0 + min_version: 2026.7.0 project: name: "${project_name}" version: "${project_version}" @@ -213,6 +213,8 @@ binary_sensor: name: "Button1" id: button1 disabled_by_default: true + filters: + - delayed_on_off: 20ms on_multi_click: - timing: - ON for at most 0.5s @@ -234,10 +236,18 @@ binary_sensor: name: "Button2" id: button2 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light2 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light2 + - timing: + - ON for at least 4s + then: + - button.press: Reset #Button3 - platform: gpio pin: @@ -249,10 +259,18 @@ binary_sensor: name: "Button3" id: button3 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light3 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light3 + - timing: + - ON for at least 4s + then: + - button.press: Reset sensor: - platform: uptime diff --git a/athom-4gang-switch.yaml b/athom-4gang-switch.yaml index c0709f3..e6e35e6 100644 --- a/athom-4gang-switch.yaml +++ b/athom-4gang-switch.yaml @@ -10,7 +10,7 @@ substitutions: # Project Name project_name: "China Athom Technology.4Gang Switch" # Projection version denotes the release version of the yaml file, allowing checking of deployed vs latest version - project_version: "v3.0.3" + project_version: "v3.0.4" # Restore the relay (GPO switch) upon reboot to state: light1_restore_mode: RESTORE_DEFAULT_OFF light2_restore_mode: RESTORE_DEFAULT_OFF @@ -40,7 +40,7 @@ esphome: comment: "${device_description}" area: "${room}" name_add_mac_suffix: true - min_version: 2025.7.0 + min_version: 2026.7.0 project: name: "${project_name}" version: "${project_version}" @@ -216,6 +216,8 @@ binary_sensor: name: "Button1" id: button1 disabled_by_default: true + filters: + - delayed_on_off: 20ms on_multi_click: - timing: - ON for at most 0.5s @@ -237,10 +239,18 @@ binary_sensor: name: "Button2" id: button2 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light2 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light2 + - timing: + - ON for at least 4s + then: + - button.press: Reset #Button3 - platform: gpio pin: @@ -252,10 +262,18 @@ binary_sensor: name: "Button3" id: button3 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light3 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light3 + - timing: + - ON for at least 4s + then: + - button.press: Reset #Button4 - platform: gpio pin: @@ -267,10 +285,18 @@ binary_sensor: name: "Button4" id: button4 disabled_by_default: true - on_click: - max_length: 0.5s - then: - - light.toggle: light4 + filters: + - delayed_on_off: 20ms + on_multi_click: + - timing: + - ON for at most 0.5s + - OFF for at least 0.2s + then: + - light.toggle: light4 + - timing: + - ON for at least 4s + then: + - button.press: Reset sensor: - platform: uptime