8 #ifdef USE_BINARY_SENSOR 10 if (include_internal || !obj->is_internal())
11 obj->add_on_state_callback([
this, obj](
bool state) { this->on_binary_sensor_update(obj, state); });
16 if (include_internal || !obj->is_internal())
17 obj->add_on_state_callback([
this, obj]() { this->on_fan_update(obj); });
22 if (include_internal || !obj->is_internal())
23 obj->add_new_remote_values_callback([
this, obj]() { this->on_light_update(obj); });
28 if (include_internal || !obj->is_internal())
29 obj->add_on_state_callback([
this, obj](
float state) { this->on_sensor_update(obj, state); });
34 if (include_internal || !obj->is_internal())
35 obj->add_on_state_callback([
this, obj](
bool state) { this->on_switch_update(obj, state); });
40 if (include_internal || !obj->is_internal())
41 obj->add_on_state_callback([
this, obj]() { this->on_cover_update(obj); });
44 #ifdef USE_TEXT_SENSOR 46 if (include_internal || !obj->is_internal())
47 obj->add_on_state_callback([
this, obj](
const std::string &
state) { this->on_text_sensor_update(obj, state); });
52 if (include_internal || !obj->is_internal())
53 obj->add_on_state_callback([
this, obj]() { this->on_climate_update(obj); });
58 if (include_internal || !obj->is_internal())
59 obj->add_on_state_callback([
this, obj](
float state) { this->on_number_update(obj, state); });
64 if (include_internal || !obj->is_internal()) {
65 obj->add_on_state_callback(
72 if (include_internal || !obj->is_internal())
73 obj->add_on_state_callback([
this, obj]() { this->on_lock_update(obj); });
76 #ifdef USE_MEDIA_PLAYER 78 if (include_internal || !obj->is_internal())
79 obj->add_on_state_callback([
this, obj]() { this->on_media_player_update(obj); });
const std::vector< climate::Climate * > & get_climates()
virtual void on_select_update(select::Select *obj, const std::string &state, size_t index)
const std::vector< fan::Fan * > & get_fans()
const std::vector< lock::Lock * > & get_locks()
const std::vector< switch_::Switch * > & get_switches()
const std::vector< text_sensor::TextSensor * > & get_text_sensors()
const std::vector< sensor::Sensor * > & get_sensors()
Application App
Global storage of Application pointer - only one Application can exist.
const std::vector< binary_sensor::BinarySensor * > & get_binary_sensors()
const std::vector< cover::Cover * > & get_covers()
const std::vector< light::LightState * > & get_lights()
void setup_controller(bool include_internal=false)
const std::vector< media_player::MediaPlayer * > & get_media_players()
const std::vector< select::Select * > & get_selects()
const std::vector< number::Number * > & get_numbers()