Zum Hauptinhalt springenZur Hauptnavigation springen

Empfohlene Produkte

📦 Unsere Smart-Switch-Empfehlungen

Ausgewählte Empfehlungen für dein Smart Home Projekt

Lädt Produkte... (smartswitch → zigbee → sensor → automation)

Ähnlich wie beim Lichtwecker zum Aufstehen erstellen wir eine Timercard mit On-Off-Time (ideal für die Gartenbewässerung oder ähnliches)

Als erstes benötigen wir wieder einige Helfer:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 #- # _ _ _ _ # (_)_ __ _ __ _ _| |_ | |__ ___ ___ | | ___ __ _ _ __ ___ # | | '_ \| '_ \| | | | __| | '_ \ / _ \ / _ \| |/ _ \/ _` | '_ \/ __| # | | | | | |_) | |_| | |_ | |_) | (_) | (_) | | __/ (_| | | | \__ \ # |_|_| |_| .__/ \__,_|\__|___|_.__/ \___/ \___/|_|\___|\__,_|_| |_|___/ # |_| |_____| # #- ## DAYS / WEEKENDS ############################################################## timer_1_mon: name: Montag #initial: off icon: mdi:calendar timer_1_tue: name: Dienstag #initial: off icon: mdi:calendar timer_1_wed: name: Mittwoch #initial: off icon: mdi:calendar timer_1_thu: name: Donnerstag #initial: off icon: mdi:calendar timer_1_fri: name: Freitag #initial: off icon: mdi:calendar timer_1_sat: name: Samstag #initial: off icon: mdi:calendar timer_1_sun: name: Sonntag #initial: off
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #- # _ _ _ # (_)_ __ _ __ _ _| |_ _ __ _ _ _ __ ___ | |__ ___ _ __ ___ # | | '_ \| '_ \| | | | __| | '_ \| | | | '_ ` _ \| '_ \ / _ \ '__/ __| # | | | | | |_) | |_| | |_ | | | | |_| | | | | | | |_) | __/ | \__ \ # |_|_| |_| .__/ \__,_|\__|___|_| |_|\__,_|_| |_| |_|_.__/ \___|_| |___/ # |_| |_____| # #- ## START TIME ################################################################### timer_1_start_hour: name: Stunden icon: mdi:timer #initial: 6 min: 0 max: 23 step: 1 timer_1_start_minutes: name: Minuten icon: mdi:timer #initial: 30 min: 0 max: 59 ## FINISH TIME ################################################################# timer_1_finish_hour: name: Stunden icon: mdi:timer #initial: 6 min: 0 max: 23 step: 1 timer_1_finish_minutes: name: Minuten icon: mdi:timer #initial: 30 min: 0 max: 59 step: 1

Im Gegensatz zum Lichtwecker benötigen wir hier nun 2 Sensoren – einen für die Startzeit und einen wo Beendet werden soll

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ####################################################### # # # SCRSENSOR # # # # # ####################################################### ## START TIME ################################################################### - platform: template sensors: timer_1_start_time: friendly_name: 'Start Time' value_template: >- {{ "%0.02d:%0.02d" | format(states("input_number.timer_1_start_hour") | int, states("input_number.timer_1_start_minutes") | int) }} ## FINISH TIME ################################################################# - platform: template sensors: timer_1_finish_time: friendly_name: 'Finish Time' value_template: >- {{ "%0.02d:%0.02d" | format(states("input_number.timer_1_finish_hour") | int, states("input_number.timer_1_finish_minutes") | int) }}

Und zum Schluss wieder ein Paar Automatisierung, damit alles funktioniert.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 alias: Timer 1 Starttime description: '' trigger: - platform: time at: '00:01:00' condition: - condition: template value_template: >- {{ is_state('input_boolean.timer_1_' ~ ['mon','tue','wed','thu','fri','sat','sun'][now().weekday()], 'on') }} - condition: template value_template: '{{ now().strftime("%H:%M") == states.sensor.timer_1_start_time.state }}' action: - service: switch.turn_on data: entity_id: - switch.tp_link_01 hide_entity: true mode: single
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 alias: Timer 1 Finishtime description: '' trigger: - platform: time at: '00:01:00' condition: - condition: template value_template: >- {{ is_state('input_boolean.timer_1_' ~ ['mon','tue','wed','thu','fri','sat','sun'][now().weekday()], 'on') }} - condition: template value_template: '{{ now().strftime("%H:%M") == states.sensor.timer_1_finish_time.state }}' action: - service: switch.turn_off data: entity_id: - switch.tp_link_01 hide_entity: true mode: single

Zum Schluss alles ins Dashboard….

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 type: vertical-stack cards: - type: entities show_header_toggle: false entities: - entity: switch.tp_link_01 - entity: sensor.timer_1_start_time icon: mdi:clock-start name: Starten um... - type: custom:fold-entity-row padding: 0 group_config: toggle: false type: custom:slider-entity-row head: label: Uhrzeit type: section items: - entity: input_number.timer_1_start_hour - entity: input_number.timer_1_start_minutes - entity: sensor.timer_1_finish_time name: Beenden um.... icon: mdi:clock-end - type: custom:fold-entity-row padding: 0 group_config: toggle: false type: custom:slider-entity-row head: label: Uhrzeit type: section items: - entity: input_number.timer_1_finish_hour - entity: input_number.timer_1_finish_minutes - type: horizontal-stack cards: - type: custom:button-card name: Mo entity: input_boolean.timer_1_mon icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: Di entity: input_boolean.timer_1_tue icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: Mi entity: input_boolean.timer_1_wed icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: Do entity: input_boolean.timer_1_thu icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: Fr entity: input_boolean.timer_1_fri icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: Sa entity: input_boolean.timer_1_sat icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61) - type: custom:button-card name: So entity: input_boolean.timer_1_sun icon: mdi:checkbox-blank-circle color: rgb(25, 155, 20) state: - value: 'off' icon: mdi:checkbox-blank-circle-outline color: rgb(61,61,61)

Shopping-Empfehlungen

Passende smartswitch-Produkte

Weitere empfohlene Produkte für dein Smart Home

Lädt Produkte... (smartswitch → zigbee → sensor → automation)

Artikel teilen

Teilen: