Hi all,
i’m using a mod firmware for my mqtt cover and i receive this state
Received message on stat/sonoff02/RESULT: b'{"Cover1":8}'
How i can extract the number 8 ?
Also i don’t understand why the sensor is reported as unknown.
I receive this log
2018-04-18 00:11:08 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/sonoff02/LWT: b'Online'
firmware:
https://github.com/kabongsteve/Sonoff-Tasmota
my actual code is
- platform: mqtt
state_topic: "stat/sonoff02/RESULT"
command_topic: "cmnd/sonoff02/Backlog"
availability_topic: "tele/sonoff02/LWT"
# command_topic: "cmnd/sonoff01/power"
# state_topic: "stat/sonoff01/POWER"
name: "Tenda 1"
qos: 0
retain: true
payload_open: "cover ON"
payload_close: "cover OFF"
payload_stop: "cover 3"
state_open: "ON"
state_closed: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: false
value_template: "{{ value.x }}"
tilt_command_topic: "cmnd/sonoff02/COVER"
tilt_status_topic: "stat/sonoff02/RESULT"
set_position_topic: "cmnd/sonoff02/COVER"
tilt_min: 5
tilt_max: 100
tilt_closed_value: 20
tilt_opened_value: 50
Thanks