Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spook alerts on action with template #846

Open
rweijnen opened this issue Oct 15, 2024 · 0 comments
Open

spook alerts on action with template #846

rweijnen opened this issue Oct 15, 2024 · 0 comments

Comments

@rweijnen
Copy link

What version of Spook are you using?

3.1.0

What version of Home Assistant are you using?

Core 2024.10.2 Supervisor 2024.10.2 Operating System Frontend 20241002.3

The problem

I have an automation that uses templating for the actions, here's an example:

alias: Huiskamer Licht aan/uit
description: ""
triggers:
  - entity_id: switch.shelly_switch_huiskamer_switch_0
    trigger: state
conditions: []
actions:
  - target:
      entity_id: light.living_room_lights
    action: light.turn_{{ trigger.to_state.state }}
  - repeat:
      while:
        - condition: template
          value_template: >
            {{ (trigger.to_state.state == 'on' and
            states('light.living_room_lights') != 'on') or
               (trigger.to_state.state == 'off' and states('light.living_room_lights') != 'off') }}
      sequence:
        - delay: "00:00:02"
        - target:
            entity_id: light.living_room_lights
          action: light.turn_{{ trigger.to_state.state }}
mode: parallel

Spook issues an error:

The automation "Huiskamer Licht aan/uit" (automation.huiskamer_licht_aan_uit) has an unknown action: light.turn_unavailable.

Not sure if this is fixable, but would be nice if Spook handles this kind of templating as I use it often e.g. to prevent needing to create an on and an off automation.

Anything in the logs? Paste it here!

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant