I have given up on automation using the HASS in-built. For now i find it too hard to debug and is too long winded.
my current set-up is using node-red to trigger HASS automations, so for instance i use the “Big Timer” node to trigger a lamp, it then sends an MQTT message to the topic HASS/switch/lamp/ with the value “on” or “off”, then in HASS i have an automation which monitors that topic, and turns the switch on or off.
I would like to use a generic component or automation that will refer to any of my HASS entity, and perform the appropriate action. For Example:
HASS/switch/lamp/, “on” will turn switch.lamp on.
HASS/script/timer/, “on” will turn script.timer off.
HASS/switch/pump/, “toggle” will toggle switch.pump.
Is there a generic way of doing this? the entity is extracted from the topic, and sets the state of that entity to the message?