Skip to content

Commit

Permalink
Merge pull request #95 from olivierbeytrison/patch-1
Browse files Browse the repository at this point in the history
Add parity for UART
  • Loading branch information
tarontop authored Oct 16, 2024
2 parents 207a0ac + eb2037c commit 88645ef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
8 changes: 6 additions & 2 deletions athom-smart-plug-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ substitutions:
room: ""
device_description: "athom smart plug v2"
project_name: "Athom Technology.Smart Plug V2"
project_version: "v2.0.5"
project_version: "v2.0.6"
sensor_update_interval: "10s"
relay_restore_mode: RESTORE_DEFAULT_ON
# Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16.
Expand Down Expand Up @@ -111,6 +111,7 @@ dashboard_import:
uart:
rx_pin: RX
baud_rate: 4800
parity: EVEN

globals:
- id: total_energy
Expand Down Expand Up @@ -230,7 +231,10 @@ sensor:
name: "Apparent Power"
filters:
- throttle_average: ${sensor_update_interval}

reactive_power:
name: "Reactive Power"
filters:
- throttle_average: ${sensor_update_interval}
power_factor:
name: "Power Factor"
filters:
Expand Down
10 changes: 7 additions & 3 deletions athom-wall-outlet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ substitutions:
room: ""
device_description: "athom wall outlet"
project_name: "Athom Technology.Athom Wall Outlet"
project_version: "v1.1.2"
project_version: "v1.1.3"
sensor_update_interval: "10s"
relay_restore_mode: RESTORE_DEFAULT_OFF
# Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16.
Expand Down Expand Up @@ -102,6 +102,7 @@ dashboard_import:
uart:
rx_pin: RX
baud_rate: 4800
parity: EVEN

globals:
- id: total_energy
Expand Down Expand Up @@ -220,7 +221,10 @@ sensor:
name: "Apparent Power"
filters:
- throttle_average: ${sensor_update_interval}

reactive_power:
name: "Reactive Power"
filters:
- throttle_average: ${sensor_update_interval}
power_factor:
name: "Power Factor"
filters:
Expand Down Expand Up @@ -379,4 +383,4 @@ time:
then:
- text_sensor.template.publish:
id: device_last_restart
state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");'
state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");'
10 changes: 7 additions & 3 deletions athom-without-relay-plug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ substitutions:
room: ""
device_description: "athom esp8285 without relay plug"
project_name: "Athom Technology.Athom Without Relay Plug"
project_version: "v2.0.5"
project_version: "v2.0.6"
sensor_update_interval: "10s"
# 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)
dns_domain: ""
Expand Down Expand Up @@ -83,6 +83,7 @@ dashboard_import:
uart:
rx_pin: RX
baud_rate: 4800
parity: EVEN

globals:
- id: total_energy
Expand Down Expand Up @@ -174,7 +175,10 @@ sensor:
name: "Apparent Power"
filters:
- throttle_average: ${sensor_update_interval}

reactive_power:
name: "Reactive Power"
filters:
- throttle_average: ${sensor_update_interval}
power_factor:
name: "Power Factor"
filters:
Expand Down Expand Up @@ -322,4 +326,4 @@ time:
then:
- text_sensor.template.publish:
id: device_last_restart
state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");'
state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");'

0 comments on commit 88645ef

Please sign in to comment.