Dimmen von Lichtern
Verfasst: Sa 28. Aug 2021, 20:44
Kenn irgendwer eine Möglichkeit, wie man in HA Lichter über Taster dimmen kann?
Irgendwie finde ich da nichts
Irgendwie finde ich da nichts
Von Smart Home Begeisterten für Smart Home Begeisterte und Alle die es noch werden wollen 😀 - Deutschsprachige Home Assistant Community -
https://community.smarthome-for-dummies.de/
https://community.smarthome-for-dummies.de/viewtopic.php?t=36
Code: Alles auswählen
wohnzimmer_controller_licht:
module: controllerx
class: E1810Controller
controller: tradfri_fernbedienung
integration: deconz
light: light.fernseher_led
Code: Alles auswählen
dachboden_controller_lms:
module: controllerx
class: E1744MediaPlayerController
controller: lautstarkeregler_dachboden
integration: deconz
media_player: media_player.dachboden
volume_steps: 30
merge_mapping:
1005:
service: switch.toggle
entity_id: switch.leiste_2
Da gebe ich dir recht, entwickle beruflich ja selbst ein wenig in ABAP und früher mal VB. Aber du weißt, 90% beim Coden ist copy and paste. Und Beispiel-Codes sind einfach gut zum Lernen.
Code: Alles auswählen
alias: FT55 Dimmen
description: ''
trigger:
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 0
which: 1
pushed: 1
id: 1_hold
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 0
which: 1
pushed: 0
id: 1_release
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 1
id: 2_hold
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 0
id: 2_release
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 1_hold
sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- repeat:
until:
- condition: trigger
id: 1_release
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
data:
brightness_step_pct: 5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- conditions:
- condition: trigger
id: 2_hold
sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- repeat:
until:
- condition: trigger
id: 2_release
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
data:
brightness_step_pct: -5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- conditions:
- condition: trigger
id: 1_release
- condition: state
entity_id: light.deckenlicht_1
state: 'off'
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
default: []
mode: restart
Code: Alles auswählen
alias: FT55 Licht Aus
description: ''
trigger:
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 1
id: 2_hold
condition: []
action:
- wait_for_trigger:
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 0
timeout: '00:00:01'
continue_on_timeout: false
- service: light.turn_off
target:
entity_id: light.deckenlicht_1
mode: restart
Code: Alles auswählen
alias: FT55 Dimmen V2
description: ''
trigger:
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 0
which: 1
pushed: 1
id: 1_hold
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 0
which: 1
pushed: 0
id: 1_release
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 1
id: 2_hold
- platform: event
event_type: button_pressed
event_data:
id:
- 254
- 247
- 71
- 146
onoff: 1
which: 1
pushed: 0
id: 2_release
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 1_hold
sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- repeat:
count: '20'
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
data:
brightness_step_pct: 5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- conditions:
- condition: trigger
id: 2_hold
sequence:
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- repeat:
count: '20'
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
data:
brightness_step_pct: -5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- conditions:
- condition: trigger
id: 1_release
- condition: state
entity_id: light.deckenlicht_1
state: 'off'
sequence:
- service: light.turn_on
target:
entity_id: light.deckenlicht_1
default: []
mode: restart
Code: Alles auswählen
alias: Dimmen mit Friends of Hue Schalter
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 1001
id: 1_hold
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 1003
id: 1_release
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 1002
id: 1_klick
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 2001
id: 2_hold
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 2003
id: 2_release
- platform: event
event_type: deconz_event
event_data:
id: foh_switch_93
event: 2002
id: 2_klick
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 1_klick
sequence:
- service: light.turn_on
target:
entity_id: light.stehleuchte1
- conditions:
- condition: trigger
id: 1_hold
sequence:
- repeat:
count: '20'
sequence:
- service: light.turn_on
target:
entity_id: light.stehleuchte1
data:
brightness_step_pct: 5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- conditions:
- condition: trigger
id: 2_klick
sequence:
- service: light.turn_off
target:
entity_id: light.stehleuchte1
- conditions:
- condition: trigger
id: 2_hold
sequence:
- repeat:
count: '20'
sequence:
- service: light.turn_on
target:
entity_id: light.stehleuchte1
data:
brightness_step_pct: -5
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
default: []
mode: restart
Jo, habe ich auch entdeckt. Aber wie du auch festgestellt hast, sind die halt ne Ecke teurer
Siehst Du, ich finde den graphischen Editor übersichtlicher. So muß halt jeder mit dem klarkommen, was er besser findet. .-)
Weniger tippen, nur klicken.
Da alles in einer Automation drin steckt, 4 Trigger mit unterschiedlichen Aktionen. Will ich ja nicht, dass sich die Aktionen hinten anstellen oder gar parallel laufen. Sondern ein neuer Trigger beendet die laufende Automation und führt sie mit einer neuen Aktion aus. Deshalb der mode: restart