i’m trying to configure my deebot robot with mqtt using the Node-Red integration. I managed to configure everything on Node-red, but i can’t split values from the mqtt message. This is what i get from the( i get many payloads with the same topic):
{"type":"CurrentUsedCustomAreaValues","value":""}
{"type":"CurrentUsedSpotAreas","value":""}
{"type":"CleanReport","value":"stop"}
{"type":"ChargeState","value":"charging"}
{"type":"SleepStatus","value":"1"}
{"type":"LifeSpan","value":{"filter":83.93,"side_brush":-0.42,"main_brush":51.92}}
{"type":"BatteryInfo","value":100,"unit":"%"}
This is how i tried to retrive the data to sensors in configuration.yaml but it's not working, i always get "unknown" sensor value
mqtt:
sensor:
- name: "filter_left"
state_topic: "vacuum/sensors"
unit_of_measurement: "h"
value_template: "{{ value_json['value'].filter }}"
- name: "main_brush_left"
state_topic: "vacuum/sensors"
unit_of_measurement: "h"
value_template: "{{ value_json['value'].main_brush }}"
- name: "side_brush_left"
state_topic: "vacuum/sensors"
unit_of_measurement: "h"
value_template: "{{ value_json['value'].side_brush }}"
- name: "vacuum_battery"
state_topic: "vacuum/sensors"
unit_of_measurement: "%"
value_template: "{{value_json.type.BatteryInfo}}"
Thanks in advance for any help