Keeping track of global states?

I need to keep track of a state that is not related to a specific device. I have a little system that keeps casting random songs from a folder to my chromecast and I want to know if this playlist is currently on, an other case could be that you have set your lighting to a certain dim-level. You watch a movie so the lights turn off, and then when you are suppose to turn them on again after the movie, you don’t know the dim-level.

What should be used for this? boolean inputs is the best I can come up with…

You mentioned a dim level and since this would be a value rather than an on/off, input booleans probably wouldn’t work but an input slider might be what you’re looking for. I’ve seen people use sliders to store values before.

okay, so inputs are best practices for this?

I don’t know about best practices but it seems to be common practice. :wink:

If you are versed in Python and find that HA automation seems lacking or doesn’t offer things you need like this, you may want to consider AppDaemon. A lot of users find it a more complete solution for advanced use cases that HA Automations can’t address.

I was just about to set up a webservice for another thing but appdaemon seems a lot more appropriate…

1 Like

I think you’ll do well there and it’s a very active and fun little sub-community. Plus HADashboard v2 now uses AppDaemon as it’s ‘engine’ so you’ll get a bonus there as well. I still do most of my automation in HA but I do use a few apps in AppDaemon that others have written to extend things in HA.

1 Like