I need some help with my mqtt cover setup for my blind.
I have managed to get the topic right and can control it through HA, the thing is that the state shows unknown but I want to see if it is open or closed. Guess its something to do with the value_template.
Also the position slider resets after the page is refreshed witch is annoying.
The MQTT topic subscribed to receive cover position messages. If position_topic is set state_topic is ignored.
So remove the state_topic line.
I think your position_topic should be ‘/raw/esp8266/2410879/out’, as I assume that you read the state in the “out” topic and set the state in the “in” topic, correct?
You cannot use the same topic for incoming and outgoing messages, being the Outgoing ones, those that go from the Control to the Device and vice versa for incoming ones.
For example, in my case I use:
position_topic: “vaalos/despacho/persiana/position”
And of course on the Device it must be published the same topic:
“vaalos/despacho/persiana/position” Every time changes the Roller Shutter (Cover) Level
Then he would need to change the payload if I understand correctly, because the payload he posted is in json and he needs the value template to extract the position key:value pair.
Exactly, it is simpler.
It’s a pain in the ass to use Jason on the Device, the used library has changed incompatible and frankly for Lovelace I see no reason for use