#General Q: Entities

1 messages · Page 1 of 1 (latest)

native furnace
#

This is a precursor question to what I really want to ask. I've realized maybe I don't fully understand Entities despite reading several pages of the docs.

Do all entities require updates from the source device? I have a diy led controller (not HA relevant) that utilizes custom hardware & software components. I can inteface with this device via raw tcp packets, in this case via pyscript. There is no light state to query. Simply light on or light off dictates the state.

My eventual goal is to make a dashboard card that can turn it on/off, and set the pattern (0-255 slider?). With this goal in mind, how do I correctly frame this diy led in terms of an entity?

formal flame
#

To make it properly, you would create a whole 'device' object. But for your use case it would be enough just to have an automation to trigger the light state when 'sensor' state changes

I'm not fully sure about the slider, but to start with you could just create a input boolean helper

https://www.home-assistant.io/integrations/input_boolean

which you can place to your dashboard. When you change the state of that boolean on/off, you trigger the automation to send accordingly the command to your controller.

On that help page there is an example automation as well. But instead of sending the notification, you want to maybe execute command line command? Or python script?

https://www.home-assistant.io/integrations/command_line/

Home Assistant

Instructions on how to use the input boolean helper with Home Assistant.

Home Assistant

Instructions on how to integrate the command line utility within Home Assistant.