danobot / entity-controller

Home Assistant Entity and lighting controller for managing devices with timers, scripts, and sun-based time restrictions.
https://danobot.github.io/ec-docs/
GNU General Public License v3.0
294 stars 40 forks source link

example of "Custom State Strings" #315

Closed blightniak closed 7 months ago

blightniak commented 10 months ago

I'm using and ELK Alarm and motion is reported as "violated" and "normal". Reading the documentation I assume I have to do a Custom State Strings and update DEFAULT_ON and OFF.

Can you give us an example.

entity_controller:
  ec_kitchen_light:
    sensor: sensor.elkm1_kitchen_motion
    entity: switch.greenhouse_heat_plug
    delay: 3

Status of the ELK sensor from developer tools

[sensor.elkm1_kitchen_motion] - ElkM1 Kitchen motion

Normal

index: 19
physical_status: eol
logical_status: normal
definition: burglar_interior
area: 1
triggered_alarm: false
icon: mdi:alarm-bell
friendly_name: ElkM1 Kitchen motion
danobot commented 8 months ago

What state does your sensor display when its in "on" state? That's the value you have to give EC such that it can properly track the sensor.