Olen / homeassistant-plant

Alternative Plant component of home assistant
298 stars 22 forks source link

Feature: Battery entity/Signal strength #60

Closed wildekek closed 5 months ago

wildekek commented 1 year ago

Since the new BLE implementation in HA (2022.8), the MiFlora devices (HHCCJCY01) report their battery status and signal strength (yay!). It would be great to have the battery/rssi as part of the plant device, so it is easier to see which plant needs a new battery. From a theoretical perspective I understand these entities are not necessarily biological properties of plants, but of the sensor device. But the convenience of having all these properties as part of the plant imo outweighs this.

Motivation: Now we have to keep the link between which plant has which battery sensor in the home-assistant plant integration, as well as in the Flower-card's battery_sensor property , which IMO is a bit of a pain and redundant. Integrating the battery as part of the plant device would allow the flower-card to just grab the battery data from the plant device.

Olen commented 1 year ago

There is no link between a battery sensor and plant in the plant integration. One reason for this is that a plant can potentially read data from multiple sensors (I have such a setup myself for certain plants), so it just does not make sense to report the status for one of those as the "plant battery".

I have added the option to show a (single) battery entry in the flower card, so you can optionally show one of the entries there.

Other than that, my suggestion is to edit the battery entity from the actual sensor device, and give it a reasonable name.

image

Some sensors provide lts of other metadata you could argue that could be added to the plant as well, but I like to keep only the data related to the actual plant as part of the plant device.

mdepa91 commented 1 year ago

Please consider that are(or can be) blueprints, that report low battery, or any other issues, for all plant class devices. In that case battery sensor can have different name and it's second place that is separated(1st is flower-card). Maybe it's one of many examples?

Many thanks for developing(and maintaining) modules!

Olen commented 5 months ago

Closing a few old issues