#Invalid config for 'binary_sensor' at packages/*, line 13: required key 'platform' not provided
1 messages · Page 1 of 1 (latest)
here i found this example
but the:
- trigger:
- trigger: mqtt
gave me an error that trigger isn't a integration
thats why i changed it to :
template:
- trigger: mqtt
topic: frigate/events
payload: "ON"
value_template: |-
{{'ON' if (
value_json.type in ['new', 'update'] and
not value_json.after.stationary and
value_json.after.label == 'person' and
(value_json.after.current_zones | select('contains', 'Deurbel')|list|count > 0)
) else 'OFF'}}
binary_sensor:
- name: "Frigate Motion - Person - Deurbel"
unique_id: frigate_motion_deurbel
state: "on"
auto_off: 60
device_class: motion
what could be the solution? thanks
Hello @pearl quest,
- triggers:
- trigger: mqtt
hm stupid ok thanks
Trigger based template sensors still use the singular word trigger for the trigger section. Using triggers as like @distant oasis suggested will result in an error.
Your issue is that binary_sensor should use the same indentation as the trigger section. You now have it on top level (same as template) making HA think you're trying to use use the binary_sensor integration
It should be
template:
- trigger:
- trigger: mqtt
binary_sensor:
- name: Frigate whatever
I thought that one changed later, but I am probably wrong...
It was probably wishful thinking on my part them.