#Spook template entity warnings

1 messages · Page 1 of 1 (latest)

unborn sky
#

@orchid seal
There were actually quite some valid warnings, so I do actually like it:
One false warning though, I had a variable to define the right notify action in an automation.
notify: "{{ 'notify.mobile_app_pixel_8_marleen' if name == 'martijn' else 'notify.mobile_app_pixel_10_pro' }}"

It gave a warning about these entities missing, which made sense as they can be entities as well.

I tried moving it to the action part of the automation, but this still gave the same warning

alias: "Send notification to phone"
action: "{{ 'notify.mobile_app_pixel_8_marleen' if name == 'martijn' else 'notify.mobile_app_pixel_10_pro' }}"
  data:
  title: "{{ name | capitalize }} is onderweg {{ (' met de ' ~ vehicle) if name == 'martijn' else ''}}"
              message: "Als {{ gender }} meteen naar huis komt is {{ gender }} er om {{ eta }}"

Might be good to exclude the notify domain when the template is placed after the action or service key
For now I just hardcoded notify. in the template and made one the last part dynamic

#

Regarding the think I mentioned in the main thread, that actually doesn't seem to be an issue

#

Spook doesn't warn about entities from disabled devices or config entries.

#

Don't know if that was intended or not?

#

I had one warning about a missing Christmas related entity, but that one had a typo

orchid seal
#

Disabled doesn't mean non-existing

#

like they are still in the system

#

so, I do include those

unborn sky
#

So, please ignore my comments in the main thread then 🙂
It works real nice, and I acutally solved 5 template issues like this

#

only thing then is when you template an action, and then it's seen as an entity

#

most domains have really fixed actions, like switch.turn_on, but for notify the action can be anything

orchid seal
#

I could diff it against the known actions to be sure

#

and exclude the list of actions (as a filter)

unborn sky
#

sounds good