rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
666 stars 73 forks source link

[Enhancement] [MQTT] Add battery level and power mode #366

Closed goodwin closed 2 years ago

goodwin commented 3 years ago

Could you please add these two attributes to the MQTT published data? Just found that those values are missing, however, they are available in the Valetudo RE own WebUI

rand256 commented 3 years ago

This data is available in the state topic.

Sebclem commented 3 years ago

@rand256 I think this can be useful if you publish the batery level to a separate topic, you can use battery_level_topic in home assistant discovery, this will add the battery level to the device like with mobile app integration: image I'm also thinking about cloning the attributes values to a specific topic, in Home assistant this can useful, currently, we need to create template entity and this is not very user friendly.

rand256 commented 3 years ago

Feel free to edit MqttClient.js to fit your needs and create a PR. I'm not using any Home assistant or other integration so I effectively don't know what and where is needed.