Hi, I can’t seem to fix this errors:
ERROR (MainThread) [homeassistant.core] Invalid service data for scene.turn_on: Entity ID is an invalid entity id for dictionary value @ data['entity_id']. Got ''
ERROR (MainThread) [homeassistant.core] Invalid service data for input_slider.select_value: expected float for dictionary value @ data['value']. Got ''
It does work, but it spams the log so I would like to fix it.
I tried a bunch of stuff, but could not figure it out.
It updates the Brightness slider-value after I change scene… I tried to do it from a scene, but could’nt get it to work.
configuration.yaml:
input_select:
scene_grottan:
name: Scene
icon: mdi:brightness-auto
initial: "-"
options:
- "-"
- "Off"
- Nightlight
- Dimmed
- Relax
- Read
- Bright
- Concentrate
- Energize
- WiLLiE
automations.yaml:
- alias: Scene Grottan
trigger:
platform: state
entity_id: input_select.scene_grottan
action:
- service: input_slider.select_value
data_template:
entity_id: input_slider.lamp_bright
value: >
{% if is_state("input_select.scene_grottan", "Nightlight") %} 1
{% elif is_state("input_select.scene_grottan", "Dimmed") %} 77
{% elif is_state("input_select.scene_grottan", "Relax") %} 144
{% elif is_state("input_select.scene_grottan", "Read") %} 254
{% elif is_state("input_select.scene_grottan", "Bright") %} 254
{% elif is_state("input_select.scene_grottan", "Concentrate") %} 254
{% elif is_state("input_select.scene_grottan", "Energize") %} 254
{% elif is_state("input_select.scene_grottan", "WiLLiE") %} 127
{% elif is_state("input_select.scene_grottan", "Off") %} 0
{% endif %}
- service: scene.turn_on
data_template:
entity_id: >
{%- if is_state( "input_select.scene_grottan", "Nightlight" ) -%} scene.grottan_nightlight
{%-elif is_state( "input_select.scene_grottan", "Dimmed" ) -%} scene.grottan_dimmed
{%-elif is_state( "input_select.scene_grottan", "Relax" ) -%} scene.grottan_relax
{%-elif is_state( "input_select.scene_grottan", "Read" ) -%} scene.grottan_read
{%-elif is_state( "input_select.scene_grottan", "Bright" ) -%} scene.grottan_bright
{%-elif is_state( "input_select.scene_grottan", "Concentrate" ) -%} scene.grottan_concentrate
{%-elif is_state( "input_select.scene_grottan", "Energize" ) -%} scene.grottan_energize
{%-elif is_state( "input_select.scene_grottan", "WiLLiE" ) -%} scene.grottan_willie
{%-elif is_state( "input_select.scene_grottan", "Off" ) -%} scene.grottan_off
{%- endif %}
- service: input_select.select_option
data:
entity_id: input_select.scene_grottan
option: "-"
a scene:
name: Grottan Bright
entities:
light.datorn:
state: on
brightness: 254
rgb_color: [255, 207, 120]
light.subben:
state: on
brightness: 254
rgb_color: [255, 207, 120]
light.soffan:
state: on
brightness: 254
rgb_color: [255, 207, 120]
# input_slider.lamp_bright:
# value: 254
edit:
If I try it directly from a scene, I get this:
2017-09-02 12:36:34 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
in "/config/scenes/grottan-bright.yaml", line 18, column 16
scenes/grottan-bright.yaml
name: Grottan Bright
entities:
light.datorn:
state: on
brightness: 254
rgb_color: [255, 207, 120]
light.subben:
state: on
brightness: 254
rgb_color: [255, 207, 120]
light.soffan:
state: on
brightness: 254
rgb_color: [255, 207, 120]
service: input_slider.select_value
data_template:
entity_id: input_slider.lamp_bright
value: 254