mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 21:32:21 +01:00
feat: add get_lamp_name method to retrieve the name of a specified lamp
This commit is contained in:
@@ -231,6 +231,10 @@ bool DynamicLampComponent::write_state_(uint8_t lamp_number, float state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string DynamicLampComponent::get_lamp_name(uint8_t lamp_number) {
|
||||
return this->active_lamps_[lamp_number].name;
|
||||
}
|
||||
|
||||
void DynamicLampComponent::set_lamp_values_(uint8_t lamp_number, bool active, uint16_t selected_outputs, uint8_t mode, uint8_t mode_value) {
|
||||
|
||||
}
|
||||
|
@@ -74,6 +74,7 @@ class DynamicLampComponent : public Component {
|
||||
void set_save_mode(uint8_t save_mode);
|
||||
void add_lamp(std::string name);
|
||||
void remove_lamp(std::string name);
|
||||
std::string get_lamp_name(uint8_t lamp_number);
|
||||
void add_output_to_lamp(std::string lamp_name, LinkedOutput *output);
|
||||
void remove_output_from_lamp(std::string lamp_name, LinkedOutput *output);
|
||||
std::array<bool, 16> get_lamp_outputs(uint8_t lamp_number);
|
||||
|
Reference in New Issue
Block a user