Scene not triggered

Hi. I have this automation:

- id: '1605697681764'
  alias: Carport bevægelse ophørt
  description: ''
  trigger:
  - type: no_motion
    platform: device
    device_id: 873ed55316d2c887528ed01c6f5a8180
    entity_id: binary_sensor.hue_outdoor_motion_sensor_1_motion
    domain: binary_sensor
    for:
      hours: 0
      minutes: 5
      seconds: 0
  condition:
  - condition: numeric_state
    entity_id: sun.sun
    value_template: '{{state.attributes.elevation}}'
    below: '5'
  action:
  - service_template: >
      {%- if states('sensor.hue_outdoor_motion_sensor_1_temperatur')| int < 5 %}
      'scene.carport_bevaegelse_ophort_lav'
      {%- else %} 
      'scene.carport_bevaegelse_ophort'
      {%- endif %}
  mode: single

As you can see, it should trigger two different scenes, depending on the temperature. - And that part is working … It actualy tryes to trigger the different once from the tempearture.

But i get this error:
homeassistant.exceptions.ServiceNotFound: Unable to find service scene/carport_bevaegelse_ophort

And that is not true. The scene exists!

- id: '1605696269038'
  name: Carport bevægelse ophørt
  entities:
    light.carport_led:
      min_mireds: 155
      max_mireds: 495
      effect_list:
      - colorloop
      - random
      brightness: 26
      color_temp: 494
      effect: none
      friendly_name: Carport LED
      supported_features: 63
      state: 'on'

nyone with at good idea?

After core update, the error is now this:

homeassistant.exceptions.HomeAssistantError: Template rendered invalid service: ‘scene.carport_bevaegelse_ophort_lav’

Looks like the same, with other words.

Try it with o instead of ø in the scene name.

Sorry… Forgot to write that… It already is…
This is the entity name: scene.carport_bevaegelse_ophort and scene.carport_bevaegelse_ophort_lav

Tryed it anyway … Didn’t change anything: Unable to find service scene/carport_bevaegelse_ophort_lav

I wonder what the ‘/’ is doing in the error message… I would have expected a ‘.’

Can you call scenes directly as a service these days?

Shouldn’t it be

action:
  service: homeassistant.turn_on
  data:
    entity_id: >
      {%- if states('sensor.hue_outdoor_motion_sensor_1_temperatur')| int < 5 %}
        scene.carport_bevaegelse_ophort_lav
      {%- else %} 
        scene.carport_bevaegelse_ophort
      {%- endif %}
1 Like

YOU are a saviour!
I didn’t know that. :slight_smile: It works.

THANKS!

1 Like