I want to make the effect’s name different from the Json command’s it send. For example if the name is Blink it should send a “1” on the command_topic and not Blink.Is this possible and is there a easy what to do that in the configuration.yaml?
I am using hass.io and the Mosquitto broker that sends Json commands.
It’s possible and easy … if you’re comfortable with templating.
For starters, you have to change from using schema: json to schema: template. Then you have create a long-winded template for command_on_template. There’s an example in the documentation to help you get started.
There’s also another way. Use the existing configuration you have but change the command_topic to something else like HA/Esp/temp. Then create an automation that subscribes to this topic. In the automation’s action, have it reformat the payload (i.e. substitute the values you want for the effect_list), then publish the modified payload to HA/Esp/Set.