diff --git a/components/truma_inetbox/TrumaStausFrameResponseStorage.h b/components/truma_inetbox/TrumaStausFrameResponseStorage.h index 09e9539..d18abd7 100644 --- a/components/truma_inetbox/TrumaStausFrameResponseStorage.h +++ b/components/truma_inetbox/TrumaStausFrameResponseStorage.h @@ -21,7 +21,7 @@ class TrumaStausFrameResponseStorage : public TrumaStausFrameStorage, public virtual bool can_update() { return this->data_valid_; } virtual TResponse *update_prepare() = 0; void update_submit() { this->update_status_unsubmitted_ = true; } - const bool has_update() const { return this->update_status_unsubmitted_; } + bool has_update() const { return this->update_status_unsubmitted_; } void set_status(T val) override { TrumaStausFrameStorage::set_status(val); this->update_status_stale_ = false; diff --git a/components/truma_inetbox/TrumaiNetBoxApp.h b/components/truma_inetbox/TrumaiNetBoxApp.h index af18bc6..68ec6c9 100644 --- a/components/truma_inetbox/TrumaiNetBoxApp.h +++ b/components/truma_inetbox/TrumaiNetBoxApp.h @@ -27,8 +27,8 @@ class TrumaiNetBoxApp : public LinBusProtocol { void lin_heartbeat() override; void lin_reset_device() override; - const TRUMA_DEVICE get_heater_device() const { return this->heater_device_; } - const TRUMA_DEVICE get_aircon_device() const { return this->aircon_device_; } + TRUMA_DEVICE get_heater_device() const { return this->heater_device_; } + TRUMA_DEVICE get_aircon_device() const { return this->aircon_device_; } TrumaiNetBoxAppAirconAuto *get_aircon_auto() { return &this->airconAuto_; } TrumaiNetBoxAppAirconManual *get_aircon_manual() { return &this->airconManual_; } diff --git a/components/truma_inetbox/TrumaiNetBoxAppClock.h b/components/truma_inetbox/TrumaiNetBoxAppClock.h index b10c56e..379a323 100644 --- a/components/truma_inetbox/TrumaiNetBoxAppClock.h +++ b/components/truma_inetbox/TrumaiNetBoxAppClock.h @@ -14,7 +14,7 @@ class TrumaiNetBoxAppClock : public TrumaStausFrameStorage, pu #ifdef USE_TIME bool can_update() { return this->data_valid_; } void update_submit() { this->update_status_unsubmitted_ = true; } - const bool has_update() const { return this->update_status_unsubmitted_; } + bool has_update() const { return this->update_status_unsubmitted_; } bool action_write_time(); void create_update_data(StatusFrame *response, u_int8_t *response_len, u_int8_t command_counter); diff --git a/components/truma_inetbox/TrumaiNetBoxAppConfig.cpp b/components/truma_inetbox/TrumaiNetBoxAppConfig.cpp index 6fc2be2..dda54de 100644 --- a/components/truma_inetbox/TrumaiNetBoxAppConfig.cpp +++ b/components/truma_inetbox/TrumaiNetBoxAppConfig.cpp @@ -8,7 +8,7 @@ namespace truma_inetbox { static const char *const TAG = "truma_inetbox.TrumaiNetBoxAppConfig"; void TrumaiNetBoxAppConfig::dump_data() const { - ESP_LOGD(TAG, "StatusFrameConfig Offset: %.1f", temp_code_to_decimal(this->config_.data_.temp_offset)); + ESP_LOGD(TAG, "StatusFrameConfig Offset: %.1f", temp_code_to_decimal(this->data_.temp_offset)); } } // namespace truma_inetbox diff --git a/components/truma_inetbox/binary_sensor/enum.h b/components/truma_inetbox/binary_sensor/enum.h index 2aac3a0..f300d72 100644 --- a/components/truma_inetbox/binary_sensor/enum.h +++ b/components/truma_inetbox/binary_sensor/enum.h @@ -5,7 +5,7 @@ namespace truma_inetbox { enum class TRUMA_BINARY_SENSOR_TYPE { UNKNOWN, - + HEATER_ROOM, HEATER_WATER, HEATER_GAS, @@ -20,6 +20,7 @@ enum class TRUMA_BINARY_SENSOR_TYPE { TIMER_WATER, }; +#ifdef ESPHOME_LOG_HAS_CONFIG static const char *enum_to_c_str(const TRUMA_BINARY_SENSOR_TYPE val) { switch (val) { case TRUMA_BINARY_SENSOR_TYPE::HEATER_ROOM: @@ -61,6 +62,7 @@ static const char *enum_to_c_str(const TRUMA_BINARY_SENSOR_TYPE val) { break; } } +#endif // ESPHOME_LOG_HAS_CONFIG } // namespace truma_inetbox } // namespace esphome \ No newline at end of file diff --git a/components/truma_inetbox/number/enum.h b/components/truma_inetbox/number/enum.h index 10f2672..394d5f5 100644 --- a/components/truma_inetbox/number/enum.h +++ b/components/truma_inetbox/number/enum.h @@ -13,6 +13,7 @@ enum class TRUMA_NUMBER_TYPE { AIRCON_MANUAL_TEMPERATURE, }; +#ifdef ESPHOME_LOG_HAS_CONFIG static const char *enum_to_c_str(const TRUMA_NUMBER_TYPE val) { switch (val) { case TRUMA_NUMBER_TYPE::TARGET_ROOM_TEMPERATURE: @@ -34,6 +35,7 @@ static const char *enum_to_c_str(const TRUMA_NUMBER_TYPE val) { break; } } +#endif // ESPHOME_LOG_HAS_CONFIG } // namespace truma_inetbox } // namespace esphome \ No newline at end of file diff --git a/components/truma_inetbox/sensor/TrumaSensor.cpp b/components/truma_inetbox/sensor/TrumaSensor.cpp index 4762151..bd3f864 100644 --- a/components/truma_inetbox/sensor/TrumaSensor.cpp +++ b/components/truma_inetbox/sensor/TrumaSensor.cpp @@ -34,10 +34,13 @@ void TrumaSensor::setup() { case TRUMA_SENSOR_TYPE::OPERATING_STATUS: this->publish_state(static_cast(status_heater->operating_status)); break; - case TRUMA_SENSOR_TYPE::HEATER_ERROR_CODE: + case TRUMA_SENSOR_TYPE::HEATER_ERROR_CODE: { float errorcode = status_heater->error_code_high * 100.0f + status_heater->error_code_low; this->publish_state(errorcode); break; + } + default: + break; } }); } diff --git a/components/truma_inetbox/sensor/TrumaSensor.h b/components/truma_inetbox/sensor/TrumaSensor.h index 3e992a5..98123c4 100644 --- a/components/truma_inetbox/sensor/TrumaSensor.h +++ b/components/truma_inetbox/sensor/TrumaSensor.h @@ -18,6 +18,7 @@ enum class TRUMA_SENSOR_TYPE { HEATER_ERROR_CODE, }; +#ifdef ESPHOME_LOG_HAS_CONFIG static const char *enum_to_c_str(const TRUMA_SENSOR_TYPE val) { switch (val) { case TRUMA_SENSOR_TYPE::CURRENT_ROOM_TEMPERATURE: @@ -52,6 +53,7 @@ static const char *enum_to_c_str(const TRUMA_SENSOR_TYPE val) { break; } } +#endif // ESPHOME_LOG_HAS_CONFIG class TrumaSensor : public Component, public sensor::Sensor, public Parented { public: