Open fokcuk opened 1 year ago
Thanks. Json format was wrong. It should be ok now. Can you retest?
I've noticed this also. When NTP is enabled then energycounter_yesterday
, energycounter_today
and energycounter_clear_date
are all published on MQTT as expected and also show up on the web UI. However none of these are discovered in home assistant, which is because command scheduleHADiscovery
doesn't include them in the MQTT homeassistant/sensor
topic.
I tried manually publishing one of the missing discovery messages to homeassistant/sensor
and that fixed it: i.e. after some ~half-hour home assistant discovered the sensor and started showing its value.
Possible cause:
In hass.c -> hass_init_power_sensor_device_info() it looks like OBK_CONSUMPTION_YESTERDAY, OBK_CONSUMPTION_TODAY, OBK_CONSUMPTION_CLEAR_DATE
are never included and therefore left out. Perhaps these are meant to be conditionally included when NTP is enabled or similar?
Here's my attempt at improving this: https://github.com/stefan064/OpenBK7231T_App
As per the header - HA MQTT discovery topic is not sending daily energy stats I can see that its sending MQTT data for daily, hourly etc in the main device topics, but there is no configuration to show what is actually getting sent to the Homeassistant discovery. When I checked MQTT data, OpenBK is sending hourly stats, but not daily stats. So HA never discovers it Is there a way to check/change what is getting to sent via HA discovery?