Software switch

Does anyone know if it is possible to create a switch entity in HA that is not tied to a hardware switch, a software switch. I am trying to create a readable entity which could be used in a condition statement for automation. I have tried to use the custom: slider-entity-row but that is tied to a physical switch entity.

1 Like

I use command line switch with no args defining commands or just null command

4 Likes

Yes, I set up the input_boolean entity, unfortunately, when trying to use the entity with the custom:slider-entity-row the input_boolean domain is not supported.

Can you explain what you are trying to accomplish?

Sure, I have an automation that controls a pump based on water temperature. There are times when I would want to override the automation action to keep the pump running. My idea was to create a ‘software switch’ which I would test as a condition in the automation. I can do that using the input_boolean toggle construct. Unfortunately, I would like to insert this in an existing card that has entities related to the pump using the ‘slider-entity-row’ custom element. The supported domains for that element does not include the input_boolean domain.

Can I ask why? That is designed for things that have multiple options (such as a volume or input number) which is why it doesn’t support input boolean. You could just combine the input boolean in with the other entities in an entities card.

eg:
image

Automations already show as OFF/ON switch if you add them in the UI

You may even create a seperate automation to turn in back ON after xx time just in case you forget or make it notify you and ask if you want to turn it back ON and have that as actionable notification

You are right. For some reason I got stuck on the custom: slider-entity-row, perhaps because I was thinking the vanilla entity entry was not going to work.
In any case your suggestion works and this issue is closed.
Thanks

Couldn’t you just use a helper?

Thats what an input boolean is.

1 Like