mirror of
https://github.com/esphome/esphome.git
synced 2025-06-18 14:25:48 +01:00
Remove last_reset_type and convert all those sensors to TOTAL_INCREASING (#2233)
This commit is contained in:
esphome
components
api
atm90e32
demo
dsmr
havells_solar
hlw8012
pulse_counter
pulse_meter
pzem004t
pzemac
sdm_meter
selec_meter
sensor
total_daily_energy
script/api_protobuf
@ -778,9 +778,9 @@ def build_service_message_type(mt):
|
||||
hout += f"bool {func}(const {mt.name} &msg);\n"
|
||||
cout += f"bool {class_name}::{func}(const {mt.name} &msg) {{\n"
|
||||
if log:
|
||||
cout += f'#ifdef HAS_PROTO_MESSAGE_DUMP\n'
|
||||
cout += f"#ifdef HAS_PROTO_MESSAGE_DUMP\n"
|
||||
cout += f' ESP_LOGVV(TAG, "{func}: %s", msg.dump().c_str());\n'
|
||||
cout += f'#endif\n'
|
||||
cout += f"#endif\n"
|
||||
# cout += f' this->set_nodelay({str(nodelay).lower()});\n'
|
||||
cout += f" return this->send_message_<{mt.name}>(msg, {id_});\n"
|
||||
cout += f"}}\n"
|
||||
@ -794,9 +794,9 @@ def build_service_message_type(mt):
|
||||
case += f"{mt.name} msg;\n"
|
||||
case += f"msg.decode(msg_data, msg_size);\n"
|
||||
if log:
|
||||
case += f'#ifdef HAS_PROTO_MESSAGE_DUMP\n'
|
||||
case += f"#ifdef HAS_PROTO_MESSAGE_DUMP\n"
|
||||
case += f'ESP_LOGVV(TAG, "{func}: %s", msg.dump().c_str());\n'
|
||||
case += f'#endif\n'
|
||||
case += f"#endif\n"
|
||||
case += f"this->{func}(msg);\n"
|
||||
if ifdef is not None:
|
||||
case += f"#endif\n"
|
||||
|
Reference in New Issue
Block a user