diff --git a/mcu-pow-dishwasher.yaml b/mcu-pow-dishwasher.yaml index 0c3bd52..e2be21b 100644 --- a/mcu-pow-dishwasher.yaml +++ b/mcu-pow-dishwasher.yaml @@ -16,21 +16,11 @@ esp32: advanced: minimum_chip_revision: "3.1" -interval: - - interval: 30s - then: - if: - condition: - wifi.connected: - then: - - light.turn_on: wifi_status_led - else: - - light.turn_off: wifi_status_led - packages: common: !include common/common.yaml uart: +- id: cse7766_uart rx_pin: 16 baud_rate: 4800 parity: EVEN @@ -120,6 +110,7 @@ output: sensor: - platform: cse7766 + uart_id: cse7766_uart current: name: Current id: a_sensor @@ -143,10 +134,15 @@ sensor: then: - light.turn_off: switch_led energy: - name: Energy" + name: Energy id: wh_sensor filters: - throttle_average: ${update_interval} + power_factor: + name: Power Factor + id: power_factor + filters: + - throttle_average: ${update_interval} - platform: total_daily_energy name: Total Daily Energy @@ -155,12 +151,6 @@ sensor: - multiply: 0.001 unit_of_measurement: kWh - - platform: template - name: Power Factor - device_class: power_factor - id: power_factor - lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; - switch: - platform: template name: Relay @@ -180,7 +170,6 @@ switch: on_turn_on: - delay: 500ms - switch.turn_off: relay_on # bi-stable relay so no need to keep on - - light.turn_on: switch_led interlock: [relay_off] - platform: gpio @@ -191,7 +180,6 @@ switch: on_turn_on: - delay: 500ms - switch.turn_off: relay_off # bi-stable relay so no need to keep on - - light.turn_off: switch_led interlock: [relay_on] time: diff --git a/mcu-pow-washer.yaml b/mcu-pow-washer.yaml index 24dc7bf..e36860f 100644 --- a/mcu-pow-washer.yaml +++ b/mcu-pow-washer.yaml @@ -16,21 +16,11 @@ esp32: advanced: minimum_chip_revision: "3.1" -interval: - - interval: 30s - then: - if: - condition: - wifi.connected: - then: - - light.turn_on: wifi_status_led - else: - - light.turn_off: wifi_status_led - packages: common: !include common/common.yaml uart: +- id: cse7766_uart rx_pin: 16 baud_rate: 4800 parity: EVEN @@ -120,6 +110,7 @@ output: sensor: - platform: cse7766 + uart_id: cse7766_uart current: name: Current id: a_sensor @@ -147,6 +138,11 @@ sensor: id: wh_sensor filters: - throttle_average: ${update_interval} + power_factor: + name: Power Factor + id: power_factor + filters: + - throttle_average: ${update_interval} - platform: total_daily_energy name: Total Daily Energy @@ -155,12 +151,6 @@ sensor: - multiply: 0.001 unit_of_measurement: kWh - - platform: template - name: Power Factor - device_class: power_factor - id: power_factor - lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; - switch: - platform: template name: Relay @@ -180,7 +170,6 @@ switch: on_turn_on: - delay: 500ms - switch.turn_off: relay_on # bi-stable relay so no need to keep on - - light.turn_on: switch_led interlock: [relay_off] - platform: gpio @@ -191,7 +180,6 @@ switch: on_turn_on: - delay: 500ms - switch.turn_off: relay_off # bi-stable relay so no need to keep on - - light.turn_off: switch_led interlock: [relay_on] time: