Automation UI breaks homematic action YAML

This is what works:

service: homematic.set_device_value
data:
  address: XXXX
  channel: 14
  param: STATE
  value: true

This is generated when I touch the automation using the UI, and it no longer works:

service: homematic.set_device_value
data:
  address: XXXX
  channel: 14
  param: STATE
  value: 'true'

Not sure if this is a bug in the Automation UI or in the Homematic component

It is. You want to send a boolean value but the editor changes it to a string.

You could open an issue but I don’t know if it will be fixed.

I assume it converts it to a string to prevent people using boolean states because this is a common error that prevents people from creating state triggers properly ( to: off is not the same as to: 'off' ) and similar.

What happens if you use this in the editor:

service: homematic.set_device_value
data:
  address: XXXX
  channel: 14
  param: STATE
  value: >
    {{ true }}

It’s not a bug, that field accepts anything: float, bool, int, string, datetime. Because of this, it defaults the field to a string because the value can be anything and a string is the ‘best’ fallback. The byproduct of this results in the value being wrapped as a string in the UI. There’s no way around this, so you’ll have to use yaml for that service.

With

value: >
    {{ true }}

it works, too and the UI no longer touches it (Visual editor not supported, use YAML)
Thank you.