Skip to content

Commit

Permalink
Fix remaining files to use action instead of service.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannytsang committed Sep 29, 2024
1 parent 4e8865b commit 694699d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/integrations/alarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ automation:
- person.danny
- person.terina
- alias: Turn on bedroom light to warn not all doors/windows are closed.
service: light.turn_on
action: light.turn_on
data:
rgb_color:
- 255
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/energy/energy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ automation:
condition: []
action:
- alias: update forecast
service: script.update_solcast
action: script.update_solcast
data: {}
- parallel:
- if:
Expand Down
22 changes: 11 additions & 11 deletions packages/integrations/energy/solar_assistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ script:
unit_of_measurement: "%"
sequence:
- alias: Set battery stop charging %
service: number.set_value
action: number.set_value
target:
entity_id: number.growatt_sph_battery_first_stop_charge
data:
Expand All @@ -189,10 +189,10 @@ script:
title: Solar Assistant
log_level: "Debug"
- alias: Make sure inverter mode schedules are turned off
service: script.solar_assistant_turn_off_mode_schedules
action: script.solar_assistant_turn_off_mode_schedules
data: {}
- alias: Set inverter mode to battery first
service: select.select_option
action: select.select_option
target:
entity_id:
- select.growatt_sph_work_mode_priority
Expand Down Expand Up @@ -229,7 +229,7 @@ script:
else:
# Do this first so it does not overlap with setting work mode which automatically enable grid schedule 1.
- alias: Make sure inverter mode schedules are turned off
service: script.solar_assistant_turn_off_mode_schedules
action: script.solar_assistant_turn_off_mode_schedules
data: {}
- choose:
- conditions:
Expand Down Expand Up @@ -326,14 +326,14 @@ script:
title: Solar Assistant
log_level: "Debug"
- alias: Set stop charge level
service: number.set_value
action: number.set_value
target:
entity_id: number.growatt_sph_battery_first_stop_charge
data:
value: >-
{{ states('number.growatt_sph_grid_first_stop_discharge')|default(50, true)|float(100) }}
- alias: Set inverter mode to export first
service: select.select_option
action: select.select_option
target:
entity_id:
- select.growatt_sph_work_mode_priority
Expand Down Expand Up @@ -372,10 +372,10 @@ script:
title: Solar Assistant
log_level: "Debug"
- alias: Make sure inverter mode schedules are turned off
service: script.solar_assistant_turn_off_mode_schedules
action: script.solar_assistant_turn_off_mode_schedules
data: {}
- alias: Set inverter mode to load first
service: select.select_option
action: select.select_option
target:
entity_id:
- select.growatt_sph_work_mode_priority
Expand Down Expand Up @@ -423,13 +423,13 @@ script:
description: "Used in UI"
sequence:
- alias: Set battery stop charging %
service: number.set_value
action: number.set_value
target:
entity_id: number.growatt_sph_battery_first_stop_charge
data:
value: "{{ states('sensor.growatt_sph_battery_state_of_charge')|float(100) }}"
- alias: Make sure inverter mode schedules are turned off
service: script.solar_assistant_turn_off_mode_schedules
action: script.solar_assistant_turn_off_mode_schedules
data: {}
- if:
- or:
Expand All @@ -451,7 +451,7 @@ script:
title: Solar Assistant
log_level: "Debug"
- alias: Set inverter mode to battery first
service: script.battery_first_priority_mode
action: script.battery_first_priority_mode
data:
max_charge: "{{ states('sensor.growatt_sph_battery_state_of_charge')|int(100) }}"
else:
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/messaging/notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ script:
value_template: "{{ todo_list['todo.shared_notifications']['items']|default([], true)|count > 0 }}"
sequence:
- alias: Deliver announcement
service: script.send_direct_notification
action: script.send_direct_notification
data:
message: >-
Please be aware of the follow:
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/nuki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ lock:
states('lock.front_door'),
states('lock.nuki_front_door_lock')) }}
lock:
service: lock.lock
action: lock.lock
target:
entity_id: >-
{{ iif(not(is_state('lock.front_door', 'unavailable')),
'lock.front_door',
'lock.nuki_front_door_lock') }}
unlock:
service: lock.unlock
action: lock.unlock
target:
entity_id: >-
{{ iif(not(is_state('lock.front_door', 'unavailable')),
Expand Down
6 changes: 3 additions & 3 deletions packages/rooms/bedroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,9 @@ automation:
condition: []
action:
- parallel:
- data: {}
entity_id: switch.bedroom_blanket
service: switch.turn_off
- action: switch.turn_off
entity_id: switch.bedroom_blanket]
data: {}
- action: script.send_to_home_log
data:
message: Electric blanket has been on for 1 hour. Turning electric blanket off.
Expand Down
8 changes: 4 additions & 4 deletions packages/time.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ automation:
condition: []
action:
- parallel:
- data: {}
- action: input_boolean.turn_on
entity_id: input_boolean.enable_morning_routine
service: input_boolean.turn_on
data: {}
- action: script.send_to_home_log
data:
message: ":clock{{ now().strftime('%I') | int }}{% if now().minute | int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :sunny: Reset morning routine run flag"
Expand Down Expand Up @@ -112,9 +112,9 @@ script:
morning_script:
alias: Morning Script
sequence:
- data: {}
- action: input_boolean.turn_off
entity_id: input_boolean.enable_morning_routine
service: input_boolean.turn_off
data: {}
- parallel:
- action: script.send_to_home_log
data:
Expand Down

0 comments on commit 694699d

Please sign in to comment.