From 30ee29827c628ab2da43afc1c8219f2dd1b80568 Mon Sep 17 00:00:00 2001 From: TheDK Date: Fri, 23 Dec 2022 00:48:00 +0100 Subject: [PATCH 1/2] Update athom-smart-plug-v2.yaml (#18) --- athom-smart-plug-v2.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/athom-smart-plug-v2.yaml b/athom-smart-plug-v2.yaml index a0425401..cc215f9b 100644 --- a/athom-smart-plug-v2.yaml +++ b/athom-smart-plug-v2.yaml @@ -16,6 +16,9 @@ esp8266: board: esp8285 restore_from_flash: true +preferences: + flash_write_interval: 3min + api: ota: @@ -94,7 +97,6 @@ sensor: - platform: total_daily_energy name: "${friendly_name} Total Daily Energy" restore: true - min_save_interval: 180s power_id: power_sensor unit_of_measurement: kWh accuracy_decimals: 3 From d7e0b846be7361d3f721b8b9db44676d8490608d Mon Sep 17 00:00:00 2001 From: Bobby Walker Date: Thu, 22 Dec 2022 17:49:18 -0600 Subject: [PATCH 2/2] Fix logic issue with garage door. (#10) --- athom-garage-door.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/athom-garage-door.yaml b/athom-garage-door.yaml index 7e391134..4072b2bc 100644 --- a/athom-garage-door.yaml +++ b/athom-garage-door.yaml @@ -2,7 +2,7 @@ substitutions: name: "athom-garage-door" friendly_name: "Athom Garage Door" project_name: "athom.garage-door" - project_version: "1.0" + project_version: "1.1" esphome: name: "${name}" @@ -99,11 +99,21 @@ cover: name: "${friendly_name}" lambda: "return id(contact).state ? COVER_OPEN : COVER_CLOSED;" open_action: - - switch.turn_on: relay + then: + - if: + condition: + lambda: 'return !id(contact).state;' + then: + - switch.turn_on: relay stop_action: - switch.turn_on: relay close_action: - - switch.turn_on: relay + then: + - if: + condition: + lambda: 'return id(contact).state;' + then: + - switch.turn_on: relay text_sensor: - platform: wifi_info