mak-gitdev / HA_enoceanmqtt

Home Assistant wrapper for enocean-mqtt (https://github.com/embyt/enocean-mqtt)
GNU General Public License v3.0
54 stars 14 forks source link

Missing `state_class: measurement` prevents plotting #83

Open jansorg opened 11 months ago

jansorg commented 11 months ago

The problem

I have a sensor providing temperature and setpoint:

[my room]
address = 0x123456
rorg = 0xA5
func = 0x10
type = 0x03

In HA, the sensor doesn't have a state_class attached. Plotting the temperature in a statistics tile is only possible with a state_class value. I added a custom mapping.yaml with a state_class: measurement for the device type above. After the change it was possible to plot the temperature (and setpoint).

I could certainly provide a PR for this change, but I'll probably won't be able to create a large one updating all temperature sensors, for example.

What type of installation are you running?

Docker

What version of HA_enoceanmqtt has the issue?

No response

What was the last working version of HA_enoceanmqtt?

No response

What type of Home Assitant installation are you running?

None

Anything in the logs that might be useful to solve the issue? (Strongly recommended if applicable)

No response

Additional information

No response

mak-gitdev commented 11 months ago

Hi @jansorg,

Thanks for this one. I will add a state_class entry in the configuration of entities that could require statistics.

Follow this issue