I plan to use this terminal command on automation.
1st step is to create shell command.
I have this message :
“Invalid config for [shell_command]: expected dictionary for dictionary value @ data[‘shell_command’]. Got [{‘mesure_forced’: “mosquitto_pub -h my_ip_address -p PORT -m “” -t ‘blueriiot/commands/release_last_unprocessed/ID’ -u ‘username’ -P ‘password’”}]. (See /config/configuration.yaml, line 50).”
You have written something incorrectly to get that error message. Please paste that section of your configuration.yaml, properly formatted using the </> button or by surrounding with three backticks (```). Formatting should look like this:
That should work if your HA installation has mosquitto_pub in its internal shell path. If it doesn’t (and perhaps a better alternative anyway) is to use the mqtt.publish service: