mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 14:38:10 +01:00
Dont dump legacy fields (#2241)
This commit is contained in:
parent
ff6bed54c6
commit
97eba1eecc
2 changed files with 2 additions and 41 deletions
|
@ -793,10 +793,6 @@ void CoverStateResponse::dump_to(std::string &out) const {
|
|||
out.append(buffer);
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_state: ");
|
||||
out.append(proto_enum_to_string<enums::LegacyCoverState>(this->legacy_state));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" position: ");
|
||||
sprintf(buffer, "%g", this->position);
|
||||
out.append(buffer);
|
||||
|
@ -880,10 +876,6 @@ void CoverCommandRequest::dump_to(std::string &out) const {
|
|||
out.append(YESNO(this->has_legacy_command));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_command: ");
|
||||
out.append(proto_enum_to_string<enums::LegacyCoverCommand>(this->legacy_command));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" has_position: ");
|
||||
out.append(YESNO(this->has_position));
|
||||
out.append("\n");
|
||||
|
@ -1330,22 +1322,6 @@ void ListEntitiesLightResponse::dump_to(std::string &out) const {
|
|||
out.append("\n");
|
||||
}
|
||||
|
||||
out.append(" legacy_supports_brightness: ");
|
||||
out.append(YESNO(this->legacy_supports_brightness));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_supports_rgb: ");
|
||||
out.append(YESNO(this->legacy_supports_rgb));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_supports_white_value: ");
|
||||
out.append(YESNO(this->legacy_supports_white_value));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_supports_color_temperature: ");
|
||||
out.append(YESNO(this->legacy_supports_color_temperature));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" min_mireds: ");
|
||||
sprintf(buffer, "%g", this->min_mireds);
|
||||
out.append(buffer);
|
||||
|
@ -2760,11 +2736,6 @@ void ExecuteServiceArgument::dump_to(std::string &out) const {
|
|||
out.append(YESNO(this->bool_));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_int: ");
|
||||
sprintf(buffer, "%d", this->legacy_int);
|
||||
out.append(buffer);
|
||||
out.append("\n");
|
||||
|
||||
out.append(" float_: ");
|
||||
sprintf(buffer, "%g", this->float_);
|
||||
out.append(buffer);
|
||||
|
@ -3180,10 +3151,6 @@ void ListEntitiesClimateResponse::dump_to(std::string &out) const {
|
|||
out.append(buffer);
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_supports_away: ");
|
||||
out.append(YESNO(this->legacy_supports_away));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" supports_action: ");
|
||||
out.append(YESNO(this->supports_action));
|
||||
out.append("\n");
|
||||
|
@ -3342,10 +3309,6 @@ void ClimateStateResponse::dump_to(std::string &out) const {
|
|||
out.append(buffer);
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_away: ");
|
||||
out.append(YESNO(this->legacy_away));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" action: ");
|
||||
out.append(proto_enum_to_string<enums::ClimateAction>(this->action));
|
||||
out.append("\n");
|
||||
|
@ -3545,10 +3508,6 @@ void ClimateCommandRequest::dump_to(std::string &out) const {
|
|||
out.append(YESNO(this->has_legacy_away));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" legacy_away: ");
|
||||
out.append(YESNO(this->legacy_away));
|
||||
out.append("\n");
|
||||
|
||||
out.append(" has_fan_mode: ");
|
||||
out.append(YESNO(this->has_fan_mode));
|
||||
out.append("\n");
|
||||
|
|
|
@ -183,6 +183,8 @@ class TypeInfo:
|
|||
|
||||
@property
|
||||
def dump_content(self):
|
||||
if self.name.startswith("legacy_"):
|
||||
return None
|
||||
o = f'out.append(" {self.name}: ");\n'
|
||||
o += self.dump(f"this->{self.field_name}") + "\n"
|
||||
o += f'out.append("\\n");\n'
|
||||
|
|
Loading…
Reference in a new issue