Skip to content

Commit

Permalink
Moved solar assistant start up check to Home Assistant package.
Browse files Browse the repository at this point in the history
Update #109
  • Loading branch information
dannytsang committed Nov 2, 2024
1 parent 23419fe commit c923ff8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
21 changes: 13 additions & 8 deletions packages/home_assistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ automation:
event: start
conditions: []
actions:
- action: script.send_to_home_log
data:
message: ":arrow_forward: Started."
title: "Home Assistant"
log_level: "Debug"
- parallel:
- action: script.send_to_home_log
data:
message: "Performing startup checks."
message: ":arrow_forward: Started."
title: "Home Assistant"
log_level: "Debug"
- action: script.check_terinas_work_laptop_status
- alias: Check Solar Assistant
action: script.solar_assistant_check_charging_mode
data:
event: "event"
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: {}
- alias: Check 3D printer enclosure light
action: script.3d_printer_check_turn_off_light
data: {}
- action: script.3d_printer_check_turn_off_light
mode: single
- id: "1664657264986"
alias: "Home Assistant: Update Available"
Expand Down
10 changes: 1 addition & 9 deletions packages/integrations/energy/solar_assistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ automation:
- trigger: time_pattern
minutes: "35"
id: time
- trigger: homeassistant
event: start
conditions:
- condition: state
entity_id: input_boolean.enable_solar_assistant_automations
Expand Down Expand Up @@ -59,13 +57,7 @@ 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') }}"
default:
- action: script.solar_assistant_check_charging_mode
data:
event: "event"
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') }}"
default: []
mode: restart

script:
Expand Down

0 comments on commit c923ff8

Please sign in to comment.