Skip to content

Commit

Permalink
Moved check zappi start up to home assistant package.
Browse files Browse the repository at this point in the history
Update #109

Fix missing parameters when calling check Zappi.

Update #108
  • Loading branch information
dannytsang committed Nov 2, 2024
1 parent c923ff8 commit 99b9761
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
16 changes: 16 additions & 0 deletions packages/home_assistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ automation:
current_electricity_import_rate: "{{ states('sensor.electricity_current_rate') }}"
current_electricity_import_rate_unit: "{{ state_attr('sensor.electricity_current_rate', 'unit_of_measurement') }}"
current_electricity_export_rate: "{{ states('sensor.electricity_export_current_rate') }}"
- alias: Check Zappi
choose:
- conditions:
- condition: state
entity_id: input_boolean.enable_zappi_automations
state: "on"
- not:
- condition: state
entity_id: sensor.myenergi_zappi_plug_status
state: "EV Disconnected"
sequence:
- action: script.zappi_check_ev_charge
data:
current_electricity_import_rate: "{{ states('sensor.electricity_current_rate') }}"
current_electricity_import_rate_unit: "{{ state_attr('sensor.electricity_current_rate', 'unit_of_measurement') }}"
current_electricity_export_rate: "{{ states('sensor.electricity_export_current_rate') }}"
- alias: Is Terina working from home
action: script.check_terinas_work_laptop_status
data: {}
Expand Down
28 changes: 8 additions & 20 deletions packages/integrations/energy/zappi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ automation:
state: "on"
actions:
- action: script.zappi_check_ev_charge
data: {}
data:
current_electricity_import_rate: "{{ states('sensor.electricity_current_rate') }}"
current_electricity_import_rate_unit: "{{ state_attr('sensor.electricity_current_rate', 'unit_of_measurement') }}"
current_electricity_export_rate: "{{ states('sensor.electricity_export_current_rate') }}"
mode: single
- id: "1712086876965"
alias: "Zappi: Charging Schedule Stopped"
Expand Down Expand Up @@ -105,25 +108,10 @@ automation:
state: "on"
actions:
- action: script.zappi_check_ev_charge
data: {}
mode: single
- id: "1712435997062"
alias: "Zappi: Check Charging Conditions When Home Assistant Starts"
description: ""
triggers:
- trigger: homeassistant
event: start
conditions:
- condition: state
entity_id: input_boolean.enable_zappi_automations
state: "on"
- not:
- condition: state
entity_id: sensor.myenergi_zappi_plug_status
state: "EV Disconnected"
actions:
- action: script.zappi_check_ev_charge
data: {}
data:
current_electricity_import_rate: "{{ states('sensor.electricity_current_rate') }}"
current_electricity_import_rate_unit: "{{ state_attr('sensor.electricity_current_rate', 'unit_of_measurement') }}"
current_electricity_export_rate: "{{ states('sensor.electricity_export_current_rate') }}"
mode: single
- id: "1715345710884"
alias: "Zappi: Unidentified Vehicle Connected"
Expand Down

0 comments on commit 99b9761

Please sign in to comment.