mirror of
https://github.com/skalavala/mysmarthome.git
synced 2025-08-19 11:38:22 +00:00
Back Alive!
This commit is contained in:
9
python_scripts/rgbcolor.py
Executable file
9
python_scripts/rgbcolor.py
Executable file
@@ -0,0 +1,9 @@
|
||||
"""
|
||||
{"entity_id":"light.hue_color_lamp_2", "rgb_color": [254, 0, 0] }
|
||||
"""
|
||||
|
||||
entity_id = data.get('entity_id')
|
||||
rgb_color = data.get('rgb_color', [255, 255, 255])
|
||||
if entity_id is not None:
|
||||
service_data = {"entity_id": entity_id, "rgb_color": rgb_color, "brightness": 255 }
|
||||
hass.services.call("light", "turn_on", service_data, False)
|
Reference in New Issue
Block a user