drivers define change

* Charts test for Ln882h and w800

* Update cmd_if.c

Try fix for DRV_GetReading without ENABLE_DRIVER_BL0937

* Update obk_config.h

* Update cmd_if.c

next try to fix Drivers w/o OBK_DISABLE_ALL_DRIVERS

* Update cmd_channels.c

... and another "DRV_GetReading" ...

* Update hass.c

... next problem: DRV_GetEnergySensorNames

* Update hass.c

.. more disabling code w/o energy driver

* Update http_fns.c

... and even more

* Update json_interface.c

... and energy drivers in json_interface.c

* Update user_main.c

another use of BL09X

* Update obk_config.h to remove define for charts driver
This commit is contained in:
MaxineMuster
2024-09-29 21:54:54 +02:00
committed by GitHub
parent 94f370ba8a
commit 46fa0b18e0
7 changed files with 19 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ void hass_populate_unique_id(ENTITY_TYPE type, int index, char* uniq_id) {
break;
case ENERGY_METER_SENSOR:
#ifndef OBK_DISABLE_ALL_DRIVERS
#ifdef ENABLE_DRIVER_BL0937
sprintf(uniq_id, "%s_sensor_%s", longDeviceName, DRV_GetEnergySensorNames(index)->hass_uniq_id_suffix);
#endif
break;
@@ -243,7 +243,7 @@ HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, const char* p
break;
case ENERGY_METER_SENSOR:
isSensor = true;
#ifndef OBK_DISABLE_ALL_DRIVERS
#ifdef ENABLE_DRIVER_BL0937
if (index <= OBK__LAST)
sprintf(g_hassBuffer, "%s", DRV_GetEnergySensorNames(index)->name_friendly);
else
@@ -455,7 +455,7 @@ HassDeviceInfo* hass_init_binary_sensor_device_info(int index, bool bInverse) {
return info;
}
#ifndef OBK_DISABLE_ALL_DRIVERS
#ifdef ENABLE_DRIVER_BL0937
/// @brief Initializes HomeAssistant power sensor device discovery storage.
/// @param index Index corresponding to energySensor_t.