Created
October 20, 2022 09:50
-
-
Save jascdk/c171605b45d71e0849a24809d52a0190 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Opvasker - Ny | |
description: "" | |
trigger: | |
- platform: state | |
entity_id: input_boolean.opvaskemaskine_boolean | |
to: "on" | |
variables: | |
dishwasher_mode: Dishcare.Dishwasher.Program.Eco50 | |
condition: [] | |
action: | |
- if: | |
- condition: state | |
entity_id: switch.012070388597000026_bsh_common_setting_powerstate | |
state: "off" | |
then: | |
- service: homeassistant.turn_on | |
data: {} | |
target: | |
entity_id: switch.012070388597000026_bsh_common_setting_powerstate | |
- service: tts.cloud_say | |
data: | |
entity_id: media_player.google_nest_hub | |
message: Opvaskemaskine er nu tændt | |
- delay: | |
hours: 0 | |
minutes: 0 | |
seconds: 5 | |
milliseconds: 0 | |
- service: homeassistant.turn_on | |
data: {} | |
target: | |
entity_id: switch.012070388597000026_dishcare_dishwasher_option_brilliancedry | |
- delay: | |
hours: 0 | |
minutes: 0 | |
seconds: 5 | |
milliseconds: 0 | |
- service: home_connect_alt.start_program | |
data: | |
device_id: 899cfbe648af5c09b2fc062549cd658a | |
program_key: "{{ dishwasher_mode }}" | |
options: | |
- key: BSH.Common.Option.StartInRelative | |
value: >- | |
{{((states("sensor.price_calculator_cheapest_time") | | |
as_datetime) - now()).total_seconds() | round}} | |
- service: tts.cloud_say | |
data: | |
entity_id: media_player.google_nest_hub | |
message: Udskudt start på opvaskemaskinen sat til {{ states("input_datetime.opvaskemaskine") }} Der er strømmen billigst | |
- service: notify.notify | |
data: | |
message: >- | |
Opvaskemaskinen udskudt start sat til kl. {{ | |
states('input_datetime.opvaskemaskine') }} | |
- delay: | |
hours: 0 | |
minutes: 0 | |
seconds: 5 | |
milliseconds: 0 | |
- service: homeassistant.turn_off | |
data: {} | |
target: | |
entity_id: input_boolean.opvaskemaskine_boolean | |
else: | |
- service: notify.notify | |
data: | |
message: Opvasker - cancelled | |
- service: tts.cloud_say | |
data: | |
entity_id: media_player.google_nest_hub | |
message: Opvaskemaskine er nu slukket | |
- service: button.press | |
data: {} | |
target: | |
entity_id: button.012070388597000026_stop | |
- delay: | |
hours: 0 | |
minutes: 0 | |
seconds: 30 | |
milliseconds: 0 | |
- service: homeassistant.turn_off | |
data: {} | |
target: | |
entity_id: switch.012070388597000026_bsh_common_setting_powerstate | |
- service: homeassistant.turn_off | |
data: {} | |
target: | |
entity_id: input_boolean.opvaskemaskine_boolean | |
mode: restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment