some refactoring

This commit is contained in:
proddy
2025-09-21 19:20:04 +02:00
parent 13db83a6de
commit 50bedb2b39
12 changed files with 18 additions and 18 deletions

View File

@@ -399,7 +399,7 @@ bool TemperatureSensor::get_value_info(JsonObject output, const char * cmd, cons
// match custom name or sensor ID
if (cmd == Helpers::toLower(sensor.name()) || cmd == Helpers::toLower(sensor.id())) {
get_value_json(output, sensor);
return Command::set_attribute(output, cmd, attribute_s);
return Command::get_attribute(output, cmd, attribute_s);
}
}
@@ -618,7 +618,7 @@ bool TemperatureSensor::Sensor::apply_customization() {
// hard coded tests
#if defined(EMSESP_TEST)
void TemperatureSensor::test() {
void TemperatureSensor::load_test_data() {
// add 2 temperature sensors
// Sensor ID: 01_0203_0405_0607
uint8_t addr[ADDR_LEN] = {1, 2, 3, 4, 5, 6, 7, 8};