Fixed HA frontend update problems for optolink switch

This commit is contained in:
j0ta29 2024-02-25 15:23:36 +00:00
parent bb51fcc314
commit 4c2fb484d3

View file

@ -22,7 +22,7 @@ class OptolinkSwitch : public DatapointComponent, public esphome::switch_::Switc
void write_state(bool value) override; void write_state(bool value) override;
const StringRef &get_component_name() override { return get_name(); } const StringRef &get_component_name() override { return get_name(); }
void datapoint_value_changed(uint8_t value) override { publish_state(state); }; void datapoint_value_changed(uint8_t value) override { publish_state((bool) value); };
}; };
} // namespace optolink } // namespace optolink