In version 2021.12 is finally introduced posisibility to trigger automation on state change only, or on attribute change only.
According blog it should work like this:
automation:
trigger:
- platform: state
entity_id: media_player.living_room
to: ~
It works indeed, but ~ (tilde) is impossible to use with visual editor, it place ‘~’ instead.
If I change to ~ by editor, it works, but can’t be edited with visual editor:
Visual editor is not supported for this configuration
The provided value for 'to' is not supported by the visual editor. We support (string) but received (null).
You can still edit your config in YAML.
Edit in YAML
platform: state
entity_id: binary_sensor.perilica_aktivna
to: null
I read the release notes about this and to be honest didn’t truly understand it as I have been triggering of state changes for some time by simply omitting the “to” or “from”.
Maybe I am missing something myself but this works and has always worked for me.
I really don’t know. My experience is that visual editor can’t place tilde in to field.
Worse, if I save ANY automation from visual editor, each tilde placed by external editor in each automation vanished.