9 AsyncResponseStream *stream = req->beginResponseStream(
"text/plain; version=0.0.4; charset=utf-8");
17 this->
sensor_row_(stream, obj, area, node, friendly_name);
20#ifdef USE_BINARY_SENSOR
29 this->
fan_row_(stream, obj, area, node, friendly_name);
35 this->
light_row_(stream, obj, area, node, friendly_name);
41 this->
cover_row_(stream, obj, area, node, friendly_name);
47 this->
switch_row_(stream, obj, area, node, friendly_name);
53 this->
lock_row_(stream, obj, area, node, friendly_name);
65 this->
number_row_(stream, obj, area, node, friendly_name);
71 this->
select_row_(stream, obj, area, node, friendly_name);
74#ifdef USE_MEDIA_PLAYER
89 this->
valve_row_(stream, obj, area, node, friendly_name);
95 this->
climate_row_(stream, obj, area, node, friendly_name);
113 stream->print(F(
"\",area=\""));
114 stream->print(area.c_str());
120 stream->print(F(
"\",node=\""));
121 stream->print(node.c_str());
126 if (!friendly_name.empty()) {
127 stream->print(F(
"\",friendly_name=\""));
128 stream->print(friendly_name.c_str());
135 stream->print(F(
"#TYPE esphome_sensor_value gauge\n"));
136 stream->print(F(
"#TYPE esphome_sensor_failed gauge\n"));
139 std::string &node, std::string &friendly_name) {
140 if (obj->
is_internal() && !this->include_internal_)
142 if (!std::isnan(obj->
state)) {
144 stream->print(F(
"esphome_sensor_failed{id=\""));
149 stream->print(F(
"\",name=\""));
151 stream->print(F(
"\"} 0\n"));
153 stream->print(F(
"esphome_sensor_value{id=\""));
158 stream->print(F(
"\",name=\""));
160 stream->print(F(
"\",unit=\""));
162 stream->print(F(
"\"} "));
164 stream->print(F(
"\n"));
167 stream->print(F(
"esphome_sensor_failed{id=\""));
172 stream->print(F(
"\",name=\""));
174 stream->print(F(
"\"} 1\n"));
180#ifdef USE_BINARY_SENSOR
182 stream->print(F(
"#TYPE esphome_binary_sensor_value gauge\n"));
183 stream->print(F(
"#TYPE esphome_binary_sensor_failed gauge\n"));
186 std::string &area, std::string &node, std::string &friendly_name) {
187 if (obj->
is_internal() && !this->include_internal_)
191 stream->print(F(
"esphome_binary_sensor_failed{id=\""));
196 stream->print(F(
"\",name=\""));
198 stream->print(F(
"\"} 0\n"));
200 stream->print(F(
"esphome_binary_sensor_value{id=\""));
205 stream->print(F(
"\",name=\""));
207 stream->print(F(
"\"} "));
208 stream->print(obj->
state);
209 stream->print(F(
"\n"));
212 stream->print(F(
"esphome_binary_sensor_failed{id=\""));
217 stream->print(F(
"\",name=\""));
219 stream->print(F(
"\"} 1\n"));
226 stream->print(F(
"#TYPE esphome_fan_value gauge\n"));
227 stream->print(F(
"#TYPE esphome_fan_failed gauge\n"));
228 stream->print(F(
"#TYPE esphome_fan_speed gauge\n"));
229 stream->print(F(
"#TYPE esphome_fan_oscillation gauge\n"));
232 std::string &friendly_name) {
233 if (obj->
is_internal() && !this->include_internal_)
235 stream->print(F(
"esphome_fan_failed{id=\""));
240 stream->print(F(
"\",name=\""));
242 stream->print(F(
"\"} 0\n"));
244 stream->print(F(
"esphome_fan_value{id=\""));
249 stream->print(F(
"\",name=\""));
251 stream->print(F(
"\"} "));
252 stream->print(obj->
state);
253 stream->print(F(
"\n"));
256 stream->print(F(
"esphome_fan_speed{id=\""));
261 stream->print(F(
"\",name=\""));
263 stream->print(F(
"\"} "));
264 stream->print(obj->
speed);
265 stream->print(F(
"\n"));
269 stream->print(F(
"esphome_fan_oscillation{id=\""));
274 stream->print(F(
"\",name=\""));
276 stream->print(F(
"\"} "));
278 stream->print(F(
"\n"));
285 stream->print(F(
"#TYPE esphome_light_state gauge\n"));
286 stream->print(F(
"#TYPE esphome_light_color gauge\n"));
287 stream->print(F(
"#TYPE esphome_light_effect_active gauge\n"));
290 std::string &node, std::string &friendly_name) {
291 if (obj->
is_internal() && !this->include_internal_)
294 stream->print(F(
"esphome_light_state{id=\""));
299 stream->print(F(
"\",name=\""));
301 stream->print(F(
"\"} "));
303 stream->print(F(
"\n"));
306 float brightness, r, g, b, w;
309 stream->print(F(
"esphome_light_color{id=\""));
314 stream->print(F(
"\",name=\""));
316 stream->print(F(
"\",channel=\"brightness\"} "));
317 stream->print(brightness);
318 stream->print(F(
"\n"));
319 stream->print(F(
"esphome_light_color{id=\""));
324 stream->print(F(
"\",name=\""));
326 stream->print(F(
"\",channel=\"r\"} "));
328 stream->print(F(
"\n"));
329 stream->print(F(
"esphome_light_color{id=\""));
334 stream->print(F(
"\",name=\""));
336 stream->print(F(
"\",channel=\"g\"} "));
338 stream->print(F(
"\n"));
339 stream->print(F(
"esphome_light_color{id=\""));
344 stream->print(F(
"\",name=\""));
346 stream->print(F(
"\",channel=\"b\"} "));
348 stream->print(F(
"\n"));
349 stream->print(F(
"esphome_light_color{id=\""));
354 stream->print(F(
"\",name=\""));
356 stream->print(F(
"\",channel=\"w\"} "));
358 stream->print(F(
"\n"));
361 if (effect ==
"None") {
362 stream->print(F(
"esphome_light_effect_active{id=\""));
367 stream->print(F(
"\",name=\""));
369 stream->print(F(
"\",effect=\"None\"} 0\n"));
371 stream->print(F(
"esphome_light_effect_active{id=\""));
376 stream->print(F(
"\",name=\""));
378 stream->print(F(
"\",effect=\""));
379 stream->print(effect.c_str());
380 stream->print(F(
"\"} 1\n"));
387 stream->print(F(
"#TYPE esphome_cover_value gauge\n"));
388 stream->print(F(
"#TYPE esphome_cover_failed gauge\n"));
391 std::string &friendly_name) {
392 if (obj->
is_internal() && !this->include_internal_)
396 stream->print(F(
"esphome_cover_failed{id=\""));
401 stream->print(F(
"\",name=\""));
403 stream->print(F(
"\"} 0\n"));
405 stream->print(F(
"esphome_cover_value{id=\""));
410 stream->print(F(
"\",name=\""));
412 stream->print(F(
"\"} "));
414 stream->print(F(
"\n"));
416 stream->print(F(
"esphome_cover_tilt{id=\""));
421 stream->print(F(
"\",name=\""));
423 stream->print(F(
"\"} "));
424 stream->print(obj->
tilt);
425 stream->print(F(
"\n"));
429 stream->print(F(
"esphome_cover_failed{id=\""));
434 stream->print(F(
"\",name=\""));
436 stream->print(F(
"\"} 1\n"));
443 stream->print(F(
"#TYPE esphome_switch_value gauge\n"));
444 stream->print(F(
"#TYPE esphome_switch_failed gauge\n"));
447 std::string &node, std::string &friendly_name) {
448 if (obj->
is_internal() && !this->include_internal_)
450 stream->print(F(
"esphome_switch_failed{id=\""));
455 stream->print(F(
"\",name=\""));
457 stream->print(F(
"\"} 0\n"));
459 stream->print(F(
"esphome_switch_value{id=\""));
464 stream->print(F(
"\",name=\""));
466 stream->print(F(
"\"} "));
467 stream->print(obj->
state);
468 stream->print(F(
"\n"));
474 stream->print(F(
"#TYPE esphome_lock_value gauge\n"));
475 stream->print(F(
"#TYPE esphome_lock_failed gauge\n"));
478 std::string &friendly_name) {
479 if (obj->
is_internal() && !this->include_internal_)
481 stream->print(F(
"esphome_lock_failed{id=\""));
486 stream->print(F(
"\",name=\""));
488 stream->print(F(
"\"} 0\n"));
490 stream->print(F(
"esphome_lock_value{id=\""));
495 stream->print(F(
"\",name=\""));
497 stream->print(F(
"\"} "));
498 stream->print(obj->
state);
499 stream->print(F(
"\n"));
504#ifdef USE_TEXT_SENSOR
506 stream->print(F(
"#TYPE esphome_text_sensor_value gauge\n"));
507 stream->print(F(
"#TYPE esphome_text_sensor_failed gauge\n"));
510 std::string &node, std::string &friendly_name) {
511 if (obj->
is_internal() && !this->include_internal_)
515 stream->print(F(
"esphome_text_sensor_failed{id=\""));
520 stream->print(F(
"\",name=\""));
522 stream->print(F(
"\"} 0\n"));
524 stream->print(F(
"esphome_text_sensor_value{id=\""));
529 stream->print(F(
"\",name=\""));
531 stream->print(F(
"\",value=\""));
532 stream->print(obj->
state.c_str());
533 stream->print(F(
"\"} "));
534 stream->print(F(
"1.0"));
535 stream->print(F(
"\n"));
538 stream->print(F(
"esphome_text_sensor_failed{id=\""));
543 stream->print(F(
"\",name=\""));
545 stream->print(F(
"\"} 1\n"));
553 stream->print(F(
"#TYPE esphome_number_value gauge\n"));
554 stream->print(F(
"#TYPE esphome_number_failed gauge\n"));
557 std::string &node, std::string &friendly_name) {
558 if (obj->
is_internal() && !this->include_internal_)
560 if (!std::isnan(obj->
state)) {
562 stream->print(F(
"esphome_number_failed{id=\""));
567 stream->print(F(
"\",name=\""));
569 stream->print(F(
"\"} 0\n"));
571 stream->print(F(
"esphome_number_value{id=\""));
576 stream->print(F(
"\",name=\""));
578 stream->print(F(
"\"} "));
579 stream->print(obj->
state);
580 stream->print(F(
"\n"));
583 stream->print(F(
"esphome_number_failed{id=\""));
588 stream->print(F(
"\",name=\""));
590 stream->print(F(
"\"} 1\n"));
597 stream->print(F(
"#TYPE esphome_select_value gauge\n"));
598 stream->print(F(
"#TYPE esphome_select_failed gauge\n"));
601 std::string &node, std::string &friendly_name) {
602 if (obj->
is_internal() && !this->include_internal_)
606 stream->print(F(
"esphome_select_failed{id=\""));
611 stream->print(F(
"\",name=\""));
613 stream->print(F(
"\"} 0\n"));
615 stream->print(F(
"esphome_select_value{id=\""));
620 stream->print(F(
"\",name=\""));
622 stream->print(F(
"\",value=\""));
623 stream->print(obj->
state.c_str());
624 stream->print(F(
"\"} "));
625 stream->print(F(
"1.0"));
626 stream->print(F(
"\n"));
629 stream->print(F(
"esphome_select_failed{id=\""));
634 stream->print(F(
"\",name=\""));
636 stream->print(F(
"\"} 1\n"));
641#ifdef USE_MEDIA_PLAYER
643 stream->print(F(
"#TYPE esphome_media_player_state_value gauge\n"));
644 stream->print(F(
"#TYPE esphome_media_player_volume gauge\n"));
645 stream->print(F(
"#TYPE esphome_media_player_is_muted gauge\n"));
646 stream->print(F(
"#TYPE esphome_media_player_failed gauge\n"));
649 std::string &area, std::string &node, std::string &friendly_name) {
650 if (obj->
is_internal() && !this->include_internal_)
652 stream->print(F(
"esphome_media_player_failed{id=\""));
657 stream->print(F(
"\",name=\""));
659 stream->print(F(
"\"} 0\n"));
661 stream->print(F(
"esphome_media_player_state_value{id=\""));
666 stream->print(F(
"\",name=\""));
668 stream->print(F(
"\",value=\""));
670 stream->print(F(
"\"} "));
671 stream->print(F(
"1.0"));
672 stream->print(F(
"\n"));
673 stream->print(F(
"esphome_media_player_volume{id=\""));
678 stream->print(F(
"\",name=\""));
680 stream->print(F(
"\"} "));
681 stream->print(obj->
volume);
682 stream->print(F(
"\n"));
683 stream->print(F(
"esphome_media_player_is_muted{id=\""));
688 stream->print(F(
"\",name=\""));
690 stream->print(F(
"\"} "));
692 stream->print(F(
"1.0"));
694 stream->print(F(
"0.0"));
696 stream->print(F(
"\n"));
702 stream->print(F(
"#TYPE esphome_update_entity_state gauge\n"));
703 stream->print(F(
"#TYPE esphome_update_entity_info gauge\n"));
704 stream->print(F(
"#TYPE esphome_update_entity_failed gauge\n"));
710 stream->print(
"unknown");
713 stream->print(
"none");
716 stream->print(
"available");
719 stream->print(
"installing");
722 stream->print(
"invalid");
728 std::string &node, std::string &friendly_name) {
729 if (obj->
is_internal() && !this->include_internal_)
733 stream->print(F(
"esphome_update_entity_failed{id=\""));
738 stream->print(F(
"\",name=\""));
740 stream->print(F(
"\"} 0\n"));
742 stream->print(F(
"esphome_update_entity_state{id=\""));
747 stream->print(F(
"\",name=\""));
749 stream->print(F(
"\",value=\""));
751 stream->print(F(
"\"} "));
752 stream->print(F(
"1.0"));
753 stream->print(F(
"\n"));
755 stream->print(F(
"esphome_update_entity_info{id=\""));
760 stream->print(F(
"\",name=\""));
762 stream->print(F(
"\",current_version=\""));
764 stream->print(F(
"\",latest_version=\""));
766 stream->print(F(
"\",title=\""));
768 stream->print(F(
"\"} "));
769 stream->print(F(
"1.0"));
770 stream->print(F(
"\n"));
773 stream->print(F(
"esphome_update_entity_failed{id=\""));
778 stream->print(F(
"\",name=\""));
780 stream->print(F(
"\"} 1\n"));
787 stream->print(F(
"#TYPE esphome_valve_operation gauge\n"));
788 stream->print(F(
"#TYPE esphome_valve_failed gauge\n"));
789 stream->print(F(
"#TYPE esphome_valve_position gauge\n"));
793 std::string &friendly_name) {
794 if (obj->
is_internal() && !this->include_internal_)
796 stream->print(F(
"esphome_valve_failed{id=\""));
801 stream->print(F(
"\",name=\""));
803 stream->print(F(
"\"} 0\n"));
805 stream->print(F(
"esphome_valve_operation{id=\""));
810 stream->print(F(
"\",name=\""));
812 stream->print(F(
"\",operation=\""));
814 stream->print(F(
"\"} "));
815 stream->print(F(
"1.0"));
816 stream->print(F(
"\n"));
819 stream->print(F(
"esphome_valve_position{id=\""));
824 stream->print(F(
"\",name=\""));
826 stream->print(F(
"\"} "));
828 stream->print(F(
"\n"));
835 stream->print(F(
"#TYPE esphome_climate_setting gauge\n"));
836 stream->print(F(
"#TYPE esphome_climate_value gauge\n"));
837 stream->print(F(
"#TYPE esphome_climate_failed gauge\n"));
841 std::string &node, std::string &friendly_name, std::string &setting,
842 const LogString *setting_value) {
843 stream->print(F(
"esphome_climate_setting{id=\""));
848 stream->print(F(
"\",name=\""));
850 stream->print(F(
"\",category=\""));
851 stream->print(setting.c_str());
852 stream->print(F(
"\",setting_value=\""));
853 stream->print(LOG_STR_ARG(setting_value));
854 stream->print(F(
"\"} "));
855 stream->print(F(
"1.0"));
856 stream->print(F(
"\n"));
860 std::string &node, std::string &friendly_name, std::string &category,
861 std::string &climate_value) {
862 stream->print(F(
"esphome_climate_value{id=\""));
867 stream->print(F(
"\",name=\""));
869 stream->print(F(
"\",category=\""));
870 stream->print(category.c_str());
871 stream->print(F(
"\"} "));
872 stream->print(climate_value.c_str());
873 stream->print(F(
"\n"));
877 std::string &node, std::string &friendly_name, std::string &category,
878 bool is_failed_value) {
879 stream->print(F(
"esphome_climate_failed{id=\""));
884 stream->print(F(
"\",name=\""));
886 stream->print(F(
"\",category=\""));
887 stream->print(category.c_str());
888 stream->print(F(
"\"} "));
889 if (is_failed_value) {
890 stream->print(F(
"1.0"));
892 stream->print(F(
"0.0"));
894 stream->print(F(
"\n"));
898 std::string &node, std::string &friendly_name) {
899 if (obj->
is_internal() && !this->include_internal_)
902 bool any_failures =
false;
903 std::string climate_mode_category =
"mode";
905 climate_setting_row_(stream, obj, area, node, friendly_name, climate_mode_category, climate_mode_value);
909 int8_t current_accuracy = traits.get_current_temperature_accuracy_decimals();
911 std::string max_temp =
"maximum_temperature";
915 std::string min_temp =
"mininum_temperature";
919 if (traits.get_supports_current_temperature()) {
920 std::string current_temp =
"current_temperature";
926 climate_value_row_(stream, obj, area, node, friendly_name, current_temp, current_temp_value);
930 if (traits.get_supports_current_humidity()) {
931 std::string current_humidity =
"current_humidity";
937 climate_value_row_(stream, obj, area, node, friendly_name, current_humidity, current_humidity_value);
941 if (traits.get_supports_target_humidity()) {
952 if (traits.get_supports_two_point_target_temperature()) {
953 std::string target_temp_low =
"target_temperature_low";
955 climate_value_row_(stream, obj, area, node, friendly_name, target_temp_low, target_temp_low_value);
956 std::string target_temp_high =
"target_temperature_high";
958 climate_value_row_(stream, obj, area, node, friendly_name, target_temp_high, target_temp_high_value);
960 std::string target_temp =
"target_temperature";
962 climate_value_row_(stream, obj, area, node, friendly_name, target_temp, target_temp_value);
964 if (traits.get_supports_action()) {
965 std::string climate_trait_category =
"action";
967 climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
969 if (traits.get_supports_fan_modes()) {
970 std::string climate_trait_category =
"fan_mode";
973 climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
974 climate_failed_row_(stream, obj, area, node, friendly_name, climate_trait_category,
false);
980 if (traits.get_supports_presets()) {
981 std::string climate_trait_category =
"preset";
984 climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
985 climate_failed_row_(stream, obj, area, node, friendly_name, climate_trait_category,
false);
991 if (traits.get_supports_swing_modes()) {
992 std::string climate_trait_category =
"swing_mode";
994 climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
996 std::string all_climate_category =
"all";
997 climate_failed_row_(stream, obj, area, node, friendly_name, all_climate_category, any_failures);
const std::string & get_area() const
Get the area of this Application set by pre_setup().
const std::string & get_friendly_name() const
Get the friendly name of this Application set by pre_setup().
const std::vector< valve::Valve * > & get_valves()
const std::vector< fan::Fan * > & get_fans()
const std::vector< switch_::Switch * > & get_switches()
const std::vector< sensor::Sensor * > & get_sensors()
const std::vector< text_sensor::TextSensor * > & get_text_sensors()
const std::vector< lock::Lock * > & get_locks()
const std::vector< select::Select * > & get_selects()
const std::vector< climate::Climate * > & get_climates()
const std::vector< light::LightState * > & get_lights()
const std::vector< update::UpdateEntity * > & get_updates()
const std::string & get_name() const
Get the name of this Application set by pre_setup().
const std::vector< cover::Cover * > & get_covers()
const std::vector< media_player::MediaPlayer * > & get_media_players()
const std::vector< binary_sensor::BinarySensor * > & get_binary_sensors()
const std::vector< number::Number * > & get_numbers()
std::string get_unit_of_measurement()
Get the unit of measurement, using the manual override if set.
const StringRef & get_name() const
std::string get_object_id() const
Base class for all binary_sensor-type classes.
virtual bool has_state() const
Return whether this binary sensor has outputted a state.
bool state
The current reported state of the binary sensor.
ClimateDevice - This is the base class for all climate integrations.
ClimateMode mode
The active mode of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
float target_temperature
The target temperature of the climate device.
float current_humidity
The current humidity of the climate device, as reported from the integration.
ClimateSwingMode swing_mode
The active swing mode of the climate device.
float target_temperature_low
The minimum target temperature of the climate device, for climate devices with split target temperatu...
float current_temperature
The current temperature of the climate device, as reported from the integration.
ClimateAction action
The active state of the climate device.
optional< ClimatePreset > preset
The active preset of the climate device.
float target_humidity
The target humidity of the climate device.
float target_temperature_high
The maximum target temperature of the climate device, for climate devices with split target temperatu...
int8_t get_target_temperature_accuracy_decimals() const
Base class for all cover devices.
float tilt
The current tilt value of the cover from 0.0 to 1.0.
float position
The position of the cover from 0.0 (fully closed) to 1.0 (fully open).
virtual CoverTraits get_traits()=0
bool get_supports_tilt() const
virtual FanTraits get_traits()=0
bool oscillating
The current oscillation state of the fan.
bool state
The current on/off state of the fan.
int speed
The current fan speed level.
bool supports_speed() const
Return if this fan supports speed modes.
bool supports_oscillation() const
Return if this fan supports oscillation.
This class represents the color state for a light object.
bool is_on() const
Get the binary true/false state of these light color values.
void as_rgbw(float *red, float *green, float *blue, float *white, float gamma=0, bool color_interlock=false) const
Convert these light color values to an RGBW representation and write them to red, green,...
void as_brightness(float *brightness, float gamma=0) const
Convert these light color values to a brightness-only representation and write them to brightness.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightColorValues remote_values
The remote color values reported to the frontend.
std::string get_effect_name()
Return the name of the current effect, or if no effect is active "None".
LightColorValues current_values
The current values of the light as outputted to the light.
Base class for all locks.
LockState state
The current reported state of the lock.
Base-class for all numbers.
value_type const & value() const
void number_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void add_friendly_name_label_(AsyncResponseStream *stream, std::string &friendly_name)
void handle_update_state_(AsyncResponseStream *stream, update::UpdateState state)
void climate_setting_row_(AsyncResponseStream *stream, climate::Climate *obj, std::string &area, std::string &node, std::string &friendly_name, std::string &setting, const LogString *setting_value)
void media_player_row_(AsyncResponseStream *stream, media_player::MediaPlayer *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the media player state as prometheus data point.
void light_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void update_entity_row_(AsyncResponseStream *stream, update::UpdateEntity *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the update state and info as prometheus data point.
std::map< EntityBase *, std::string > relabel_map_id_
void fan_row_(AsyncResponseStream *stream, fan::Fan *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the fan state as prometheus data point.
void climate_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void binary_sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void switch_row_(AsyncResponseStream *stream, switch_::Switch *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the switch values state as prometheus data point.
std::map< EntityBase *, std::string > relabel_map_name_
void sensor_row_(AsyncResponseStream *stream, sensor::Sensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the sensor state as prometheus data point.
void light_row_(AsyncResponseStream *stream, light::LightState *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the light values state as prometheus data point.
void climate_row_(AsyncResponseStream *stream, climate::Climate *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the climate state as prometheus data point.
void update_entity_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void climate_failed_row_(AsyncResponseStream *stream, climate::Climate *obj, std::string &area, std::string &node, std::string &friendly_name, std::string &category, bool is_failed_value)
void binary_sensor_row_(AsyncResponseStream *stream, binary_sensor::BinarySensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the binary sensor state as prometheus data point.
void number_row_(AsyncResponseStream *stream, number::Number *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the number state as prometheus data point.
void valve_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void switch_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void media_player_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void text_sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
std::string relabel_id_(EntityBase *obj)
void text_sensor_row_(AsyncResponseStream *stream, text_sensor::TextSensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the text sensor values state as prometheus data point.
void add_area_label_(AsyncResponseStream *stream, std::string &area)
void select_row_(AsyncResponseStream *stream, select::Select *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the select state as prometheus data point.
std::string relabel_name_(EntityBase *obj)
void cover_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void select_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void add_node_label_(AsyncResponseStream *stream, std::string &node)
void handleRequest(AsyncWebServerRequest *req) override
void climate_value_row_(AsyncResponseStream *stream, climate::Climate *obj, std::string &area, std::string &node, std::string &friendly_name, std::string &category, std::string &climate_value)
void cover_row_(AsyncResponseStream *stream, cover::Cover *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the cover values state as prometheus data point.
void lock_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void valve_row_(AsyncResponseStream *stream, valve::Valve *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the valve state as prometheus data point.
void fan_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void lock_row_(AsyncResponseStream *stream, lock::Lock *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the lock values state as prometheus data point.
Base-class for all selects.
bool has_state() const
Return whether this select component has gotten a full state yet.
Base-class for all sensors.
float state
This member variable stores the last state that has passed through all filters.
int8_t get_accuracy_decimals()
Get the accuracy in decimals, using the manual override if set.
Base class for all switches.
bool state
The current reported state of the binary sensor.
const UpdateState & state
const UpdateInfo & update_info
Base class for all valve devices.
float position
The position of the valve from 0.0 (fully closed) to 1.0 (fully open).
ValveOperation current_operation
The current operation of the valve (idle, opening, closing).
virtual ValveTraits get_traits()=0
bool get_supports_position() const
const LogString * climate_action_to_string(ClimateAction action)
Convert the given ClimateAction to a human-readable string.
const LogString * climate_swing_mode_to_string(ClimateSwingMode swing_mode)
Convert the given ClimateSwingMode to a human-readable string.
const LogString * climate_preset_to_string(ClimatePreset preset)
Convert the given PresetMode to a human-readable string.
const LogString * climate_fan_mode_to_string(ClimateFanMode fan_mode)
Convert the given ClimateFanMode to a human-readable string.
const LogString * climate_mode_to_string(ClimateMode mode)
Convert the given ClimateMode to a human-readable string.
@ UPDATE_STATE_INSTALLING
const char * valve_operation_to_str(ValveOperation op)
Providing packet encoding functions for exchanging data with a remote host.
std::string value_accuracy_to_string(float value, int8_t accuracy_decimals)
Create a string from a value and an accuracy in decimals.
Application App
Global storage of Application pointer - only one Application can exist.
std::string current_version
std::string latest_version