I have seen taht manipulating template switch with AppDaemon is not recommended and not alawys working so, my question is, How would you do the “Garage Door + sensor for garage door status” but directly in AppDaemon ithout the usual template switch ?
In HA I want at the end the single switch I use to have with template switch.
PS: My case is not the garade door one, getting the status of my switch definitively requires python code so…
I think you need a little more explanation about your project before anyone can really help, but why do you think that template switches cannot be manipulated from AD? They can switch on and off just like any other switch.
i am working on an app that can create all kind of HA entities with appdaemon.
but in your case its probably the easiest way just to use an input_boolean.
thats also a switch, but with nothing attached to it. so you can do everything in appdaemon.
Can accross an issue when my boolean when switched from HA is
{‘domain’: ‘input_boolean’, ‘service’: ‘turn_on’, ‘service_data’: {‘entity_id’: ‘input_boolean.ampliaudio’}}
Strangely the entity is in a list… which obliged me to do :
if data[‘service_data’][‘entity_id’][0] == ‘input_boolean.ampliaudio’ or data[‘service_data’][‘entity_id’] == ‘input_boolean.ampliaudio’:
thats because the HA service turn_on accepts list of entities or a single entity.
in HA you got only 1 entity, so its giving the service for just 1
dashboard is already ready to be able to use several entities at once (allthough you only can give 1 at this moment)