18#if defined(ESPHOME_API_WITH_JSON) || defined(__has_include)
19#if defined(ESPHOME_API_WITH_JSON) || __has_include(<nlohmann/json.hpp>)
20#define ESPHOME_API_JSON_AVAILABLE 1
24#ifdef ESPHOME_API_JSON_AVAILABLE
35#include <nlohmann/json.hpp>
98NLOHMANN_JSON_SERIALIZE_ENUM(
LogLevel,
180NLOHMANN_JSON_SERIALIZE_ENUM(
TextMode,
298inline void entity_info_to_json(nlohmann::json& j,
const EntityInfo& v) {
300 j[
"object_id"] = v.object_id;
303 j[
"disabled_by_default"] = v.disabled_by_default;
304 j[
"entity_category"] = v.entity_category;
305 j[
"device_id"] = v.device_id;
308inline void entity_info_from_json(
const nlohmann::json& j, EntityInfo& v) {
309 v.key = j.value(
"key", 0U);
310 v.object_id = j.value(
"object_id", std::string{});
311 v.name = j.value(
"name", std::string{});
312 v.icon = j.value(
"icon", std::string{});
313 v.disabled_by_default = j.value(
"disabled_by_default",
false);
315 v.device_id = j.value(
"device_id", 0U);
322inline void to_json(nlohmann::json& j,
const BinarySensorInfo& v) {
323 entity_info_to_json(j, v);
324 j[
"device_class"] = v.device_class;
325 j[
"is_status_binary_sensor"] = v.is_status_binary_sensor;
327inline void from_json(
const nlohmann::json& j, BinarySensorInfo& v) {
328 entity_info_from_json(j, v);
329 v.device_class = j.value(
"device_class", std::string{});
330 v.is_status_binary_sensor = j.value(
"is_status_binary_sensor",
false);
333inline void to_json(nlohmann::json& j,
const SensorInfo& v) {
334 entity_info_to_json(j, v);
335 j[
"unit_of_measurement"] = v.unit_of_measurement;
336 j[
"accuracy_decimals"] = v.accuracy_decimals;
337 j[
"force_update"] = v.force_update;
338 j[
"device_class"] = v.device_class;
339 j[
"state_class"] = v.state_class;
341inline void from_json(
const nlohmann::json& j, SensorInfo& v) {
342 entity_info_from_json(j, v);
343 v.unit_of_measurement = j.value(
"unit_of_measurement", std::string{});
344 v.accuracy_decimals = j.value(
"accuracy_decimals", 0);
345 v.force_update = j.value(
"force_update",
false);
346 v.device_class = j.value(
"device_class", std::string{});
350inline void to_json(nlohmann::json& j,
const TextSensorInfo& v) {
351 entity_info_to_json(j, v);
352 j[
"device_class"] = v.device_class;
354inline void from_json(
const nlohmann::json& j, TextSensorInfo& v) {
355 entity_info_from_json(j, v);
356 v.device_class = j.value(
"device_class", std::string{});
359inline void to_json(nlohmann::json& j,
const SwitchInfo& v) {
360 entity_info_to_json(j, v);
361 j[
"assumed_state"] = v.assumed_state;
362 j[
"device_class"] = v.device_class;
364inline void from_json(
const nlohmann::json& j, SwitchInfo& v) {
365 entity_info_from_json(j, v);
366 v.assumed_state = j.value(
"assumed_state",
false);
367 v.device_class = j.value(
"device_class", std::string{});
370inline void to_json(nlohmann::json& j,
const LightInfo& v) {
371 entity_info_to_json(j, v);
372 j[
"supported_color_modes"] = v.supported_color_modes;
373 j[
"min_mireds"] = v.min_mireds;
374 j[
"max_mireds"] = v.max_mireds;
375 j[
"effects"] = v.effects;
377inline void from_json(
const nlohmann::json& j, LightInfo& v) {
378 entity_info_from_json(j, v);
379 v.supported_color_modes = j.value(
"supported_color_modes", std::vector<ColorMode>{});
380 v.min_mireds = j.value(
"min_mireds", 0.0F);
381 v.max_mireds = j.value(
"max_mireds", 0.0F);
382 v.effects = j.value(
"effects", std::vector<std::string>{});
385inline void to_json(nlohmann::json& j,
const CoverInfo& v) {
386 entity_info_to_json(j, v);
387 j[
"assumed_state"] = v.assumed_state;
388 j[
"supports_position"] = v.supports_position;
389 j[
"supports_tilt"] = v.supports_tilt;
390 j[
"device_class"] = v.device_class;
391 j[
"supports_stop"] = v.supports_stop;
393inline void from_json(
const nlohmann::json& j, CoverInfo& v) {
394 entity_info_from_json(j, v);
395 v.assumed_state = j.value(
"assumed_state",
false);
396 v.supports_position = j.value(
"supports_position",
false);
397 v.supports_tilt = j.value(
"supports_tilt",
false);
398 v.device_class = j.value(
"device_class", std::string{});
399 v.supports_stop = j.value(
"supports_stop",
false);
402inline void to_json(nlohmann::json& j,
const FanInfo& v) {
403 entity_info_to_json(j, v);
404 j[
"supports_oscillation"] = v.supports_oscillation;
405 j[
"supports_speed"] = v.supports_speed;
406 j[
"supports_direction"] = v.supports_direction;
407 j[
"supported_speed_count"] = v.supported_speed_count;
408 j[
"supported_preset_modes"] = v.supported_preset_modes;
410inline void from_json(
const nlohmann::json& j, FanInfo& v) {
411 entity_info_from_json(j, v);
412 v.supports_oscillation = j.value(
"supports_oscillation",
false);
413 v.supports_speed = j.value(
"supports_speed",
false);
414 v.supports_direction = j.value(
"supports_direction",
false);
415 v.supported_speed_count = j.value(
"supported_speed_count", 0);
416 v.supported_preset_modes = j.value(
"supported_preset_modes", std::vector<std::string>{});
419inline void to_json(nlohmann::json& j,
const ClimateInfo& v) {
420 entity_info_to_json(j, v);
421 j[
"supported_modes"] = v.supported_modes;
422 j[
"visual_min_temperature"] = v.visual_min_temperature;
423 j[
"visual_max_temperature"] = v.visual_max_temperature;
424 j[
"visual_target_temperature_step"] = v.visual_target_temperature_step;
425 j[
"supported_fan_modes"] = v.supported_fan_modes;
426 j[
"supported_swing_modes"] = v.supported_swing_modes;
427 j[
"supported_custom_fan_modes"] = v.supported_custom_fan_modes;
428 j[
"supported_presets"] = v.supported_presets;
429 j[
"supported_custom_presets"] = v.supported_custom_presets;
430 j[
"visual_current_temperature_step"] = v.visual_current_temperature_step;
431 j[
"visual_min_humidity"] = v.visual_min_humidity;
432 j[
"visual_max_humidity"] = v.visual_max_humidity;
433 j[
"feature_flags"] = v.feature_flags;
434 j[
"temperature_unit"] = v.temperature_unit;
436inline void from_json(
const nlohmann::json& j, ClimateInfo& v) {
437 entity_info_from_json(j, v);
438 v.supported_modes = j.value(
"supported_modes", std::vector<ClimateMode>{});
439 v.visual_min_temperature = j.value(
"visual_min_temperature", 0.0F);
440 v.visual_max_temperature = j.value(
"visual_max_temperature", 0.0F);
441 v.visual_target_temperature_step = j.value(
"visual_target_temperature_step", 0.0F);
442 v.supported_fan_modes = j.value(
"supported_fan_modes", std::vector<ClimateFanMode>{});
443 v.supported_swing_modes = j.value(
"supported_swing_modes", std::vector<ClimateSwingMode>{});
444 v.supported_custom_fan_modes =
445 j.value(
"supported_custom_fan_modes", std::vector<std::string>{});
446 v.supported_presets = j.value(
"supported_presets", std::vector<ClimatePreset>{});
447 v.supported_custom_presets = j.value(
"supported_custom_presets", std::vector<std::string>{});
448 v.visual_current_temperature_step = j.value(
"visual_current_temperature_step", 0.0F);
449 v.visual_min_humidity = j.value(
"visual_min_humidity", 0.0F);
450 v.visual_max_humidity = j.value(
"visual_max_humidity", 0.0F);
451 v.feature_flags = j.value(
"feature_flags", 0U);
455inline void to_json(nlohmann::json& j,
const NumberInfo& v) {
456 entity_info_to_json(j, v);
457 j[
"min_value"] = v.min_value;
458 j[
"max_value"] = v.max_value;
460 j[
"unit_of_measurement"] = v.unit_of_measurement;
462 j[
"device_class"] = v.device_class;
464inline void from_json(
const nlohmann::json& j, NumberInfo& v) {
465 entity_info_from_json(j, v);
466 v.min_value = j.value(
"min_value", 0.0F);
467 v.max_value = j.value(
"max_value", 0.0F);
468 v.step = j.value(
"step", 0.0F);
469 v.unit_of_measurement = j.value(
"unit_of_measurement", std::string{});
471 v.device_class = j.value(
"device_class", std::string{});
474inline void to_json(nlohmann::json& j,
const SelectInfo& v) {
475 entity_info_to_json(j, v);
476 j[
"options"] = v.options;
478inline void from_json(
const nlohmann::json& j, SelectInfo& v) {
479 entity_info_from_json(j, v);
480 v.options = j.value(
"options", std::vector<std::string>{});
483inline void to_json(nlohmann::json& j,
const TextInfo& v) {
484 entity_info_to_json(j, v);
485 j[
"min_length"] = v.min_length;
486 j[
"max_length"] = v.max_length;
487 j[
"pattern"] = v.pattern;
490inline void from_json(
const nlohmann::json& j, TextInfo& v) {
491 entity_info_from_json(j, v);
492 v.min_length = j.value(
"min_length", 0U);
493 v.max_length = j.value(
"max_length", 0U);
494 v.pattern = j.value(
"pattern", std::string{});
498inline void to_json(nlohmann::json& j,
const ButtonInfo& v) {
499 entity_info_to_json(j, v);
500 j[
"device_class"] = v.device_class;
502inline void from_json(
const nlohmann::json& j, ButtonInfo& v) {
503 entity_info_from_json(j, v);
504 v.device_class = j.value(
"device_class", std::string{});
507inline void to_json(nlohmann::json& j,
const LockInfo& v) {
508 entity_info_to_json(j, v);
509 j[
"assumed_state"] = v.assumed_state;
510 j[
"supports_open"] = v.supports_open;
511 j[
"requires_code"] = v.requires_code;
512 j[
"code_format"] = v.code_format;
514inline void from_json(
const nlohmann::json& j, LockInfo& v) {
515 entity_info_from_json(j, v);
516 v.assumed_state = j.value(
"assumed_state",
false);
517 v.supports_open = j.value(
"supports_open",
false);
518 v.requires_code = j.value(
"requires_code",
false);
519 v.code_format = j.value(
"code_format", std::string{});
522inline void to_json(nlohmann::json& j,
const MediaPlayerSupportedFormat& v) {
523 j = nlohmann::json{{
"format", v.format},
524 {
"sample_rate", v.sample_rate},
525 {
"num_channels", v.num_channels},
526 {
"purpose", v.purpose},
527 {
"sample_bytes", v.sample_bytes}};
529inline void from_json(
const nlohmann::json& j, MediaPlayerSupportedFormat& v) {
530 v.format = j.value(
"format", std::string{});
531 v.sample_rate = j.value(
"sample_rate", 0U);
532 v.num_channels = j.value(
"num_channels", 0U);
534 v.sample_bytes = j.value(
"sample_bytes", 0U);
537inline void to_json(nlohmann::json& j,
const MediaPlayerInfo& v) {
538 entity_info_to_json(j, v);
539 j[
"supports_pause"] = v.supports_pause;
540 j[
"supported_formats"] = v.supported_formats;
542inline void from_json(
const nlohmann::json& j, MediaPlayerInfo& v) {
543 entity_info_from_json(j, v);
544 v.supports_pause = j.value(
"supports_pause",
false);
545 v.supported_formats = j.value(
"supported_formats", std::vector<MediaPlayerSupportedFormat>{});
548inline void to_json(nlohmann::json& j,
const CameraInfo& v) {
549 entity_info_to_json(j, v);
551inline void from_json(
const nlohmann::json& j, CameraInfo& v) {
552 entity_info_from_json(j, v);
555inline void to_json(nlohmann::json& j,
const SirenInfo& v) {
556 entity_info_to_json(j, v);
557 j[
"tones"] = v.tones;
558 j[
"supports_duration"] = v.supports_duration;
559 j[
"supports_volume"] = v.supports_volume;
561inline void from_json(
const nlohmann::json& j, SirenInfo& v) {
562 entity_info_from_json(j, v);
563 v.tones = j.value(
"tones", std::vector<std::string>{});
564 v.supports_duration = j.value(
"supports_duration",
false);
565 v.supports_volume = j.value(
"supports_volume",
false);
568inline void to_json(nlohmann::json& j,
const AlarmControlPanelInfo& v) {
569 entity_info_to_json(j, v);
570 j[
"supported_features"] = v.supported_features;
571 j[
"requires_code"] = v.requires_code;
572 j[
"requires_code_to_arm"] = v.requires_code_to_arm;
574inline void from_json(
const nlohmann::json& j, AlarmControlPanelInfo& v) {
575 entity_info_from_json(j, v);
576 v.supported_features = j.value(
"supported_features", 0U);
577 v.requires_code = j.value(
"requires_code",
false);
578 v.requires_code_to_arm = j.value(
"requires_code_to_arm",
false);
581inline void to_json(nlohmann::json& j,
const DateInfo& v) {
582 entity_info_to_json(j, v);
584inline void from_json(
const nlohmann::json& j, DateInfo& v) {
585 entity_info_from_json(j, v);
588inline void to_json(nlohmann::json& j,
const DateTimeInfo& v) {
589 entity_info_to_json(j, v);
591inline void from_json(
const nlohmann::json& j, DateTimeInfo& v) {
592 entity_info_from_json(j, v);
595inline void to_json(nlohmann::json& j,
const TimeInfo& v) {
596 entity_info_to_json(j, v);
598inline void from_json(
const nlohmann::json& j, TimeInfo& v) {
599 entity_info_from_json(j, v);
602inline void to_json(nlohmann::json& j,
const ValveInfo& v) {
603 entity_info_to_json(j, v);
604 j[
"device_class"] = v.device_class;
605 j[
"assumed_state"] = v.assumed_state;
606 j[
"supports_position"] = v.supports_position;
607 j[
"supports_stop"] = v.supports_stop;
609inline void from_json(
const nlohmann::json& j, ValveInfo& v) {
610 entity_info_from_json(j, v);
611 v.device_class = j.value(
"device_class", std::string{});
612 v.assumed_state = j.value(
"assumed_state",
false);
613 v.supports_position = j.value(
"supports_position",
false);
614 v.supports_stop = j.value(
"supports_stop",
false);
617inline void to_json(nlohmann::json& j,
const EventInfo& v) {
618 entity_info_to_json(j, v);
619 j[
"device_class"] = v.device_class;
620 j[
"event_types"] = v.event_types;
622inline void from_json(
const nlohmann::json& j, EventInfo& v) {
623 entity_info_from_json(j, v);
624 v.device_class = j.value(
"device_class", std::string{});
625 v.event_types = j.value(
"event_types", std::vector<std::string>{});
628inline void to_json(nlohmann::json& j,
const UpdateInfo& v) {
629 entity_info_to_json(j, v);
630 j[
"device_class"] = v.device_class;
632inline void from_json(
const nlohmann::json& j, UpdateInfo& v) {
633 entity_info_from_json(j, v);
634 v.device_class = j.value(
"device_class", std::string{});
637inline void to_json(nlohmann::json& j,
const WaterHeaterInfo& v) {
638 entity_info_to_json(j, v);
639 j[
"min_temperature"] = v.min_temperature;
640 j[
"max_temperature"] = v.max_temperature;
641 j[
"target_temperature_step"] = v.target_temperature_step;
642 j[
"supported_modes"] = v.supported_modes;
643 j[
"supported_features"] = v.supported_features;
644 j[
"temperature_unit"] = v.temperature_unit;
646inline void from_json(
const nlohmann::json& j, WaterHeaterInfo& v) {
647 entity_info_from_json(j, v);
648 v.min_temperature = j.value(
"min_temperature", 0.0F);
649 v.max_temperature = j.value(
"max_temperature", 0.0F);
650 v.target_temperature_step = j.value(
"target_temperature_step", 0.0F);
651 v.supported_modes = j.value(
"supported_modes", std::vector<WaterHeaterMode>{});
652 v.supported_features = j.value(
"supported_features", 0U);
656inline void to_json(nlohmann::json& j,
const InfraredInfo& v) {
657 entity_info_to_json(j, v);
658 j[
"capabilities"] = v.capabilities;
659 j[
"receiver_frequency"] = v.receiver_frequency;
661inline void from_json(
const nlohmann::json& j, InfraredInfo& v) {
662 entity_info_from_json(j, v);
663 v.capabilities = j.value(
"capabilities", 0U);
664 v.receiver_frequency = j.value(
"receiver_frequency", 0U);
667inline void to_json(nlohmann::json& j,
const RadioFrequencyInfo& v) {
668 entity_info_to_json(j, v);
669 j[
"capabilities"] = v.capabilities;
670 j[
"frequency_min"] = v.frequency_min;
671 j[
"frequency_max"] = v.frequency_max;
672 j[
"supported_modulations"] = v.supported_modulations;
674inline void from_json(
const nlohmann::json& j, RadioFrequencyInfo& v) {
675 entity_info_from_json(j, v);
676 v.capabilities = j.value(
"capabilities", 0U);
677 v.frequency_min = j.value(
"frequency_min", 0U);
678 v.frequency_max = j.value(
"frequency_max", 0U);
679 v.supported_modulations = j.value(
"supported_modulations", 0U);
686NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BinarySensorState, key, state, missing_state)
687NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SensorState, key, state, missing_state)
688NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(TextSensorState, key, state, missing_state)
689NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SwitchState, key, state)
690NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(LightState,
704NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(CoverState, key, position, tilt, current_operation)
705NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
706 FanState, key, state, oscillating, direction, speed_level, preset_mode)
707NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(ClimateState,
712 target_temperature_low,
713 target_temperature_high,
722NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(NumberState, key, state, missing_state)
723NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SelectState, key, state, missing_state)
724NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(TextState, key, state, missing_state)
725NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(LockEntityState, key, state)
726NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(MediaPlayerStatus, key, state, volume, muted)
727NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SirenState, key, state)
728NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(AlarmControlPanelStatus, key, state)
729NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(DateState, key, missing_state, year, month, day)
730NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(DateTimeState, key, missing_state, epoch_seconds)
731NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(TimeState, key, missing_state, hour, minute, second)
732NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(ValveState, key, position, current_operation)
733NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(EventState, key, event_type)
734NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(UpdateState,
745NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(WaterHeaterState,
751 target_temperature_low,
752 target_temperature_high)
758NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SerialProxyPortInfo,
name, port_type)
759NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(DeviceInfo,
763 bluetooth_mac_address,
773 api_encryption_supported,
774 bluetooth_proxy_feature_flags,
775 voice_assistant_feature_flags,
776 zwave_proxy_feature_flags,
779NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(DiscoveredDevice,
800NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(LogEntry, level, message)
806NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleServiceData, uuid, data)
807NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleManufacturerData, uuid, data)
808NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleAdvertisement,
816NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
817 BleRawAdvertisement, address, rssi, address_type, data)
818NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleScannerState, state, mode, configured_mode)
819NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleConnection, address, connected, mtu, error)
820NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleConnectionsFree, free, limit, allocated)
821NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattRead, address, handle, data)
822NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattNotifyData, address, handle, data)
823NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattDescriptor, uuid, handle)
824NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
825 BleGattCharacteristic, uuid, handle, properties, descriptors)
826NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattService, uuid, handle, characteristics)
827NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattServices, address, services)
828NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattError, address, handle, error)
829NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattReadResult, address, handle, ok, data, error)
830NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattWriteResult, address, handle, ok, error)
831NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(BleGattServicesResult, address, ok, services, error)
837NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
838 SerialProxyConfig, instance, baudrate, flow_control, parity, stop_bits, data_size)
839NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SerialProxyData, instance, data)
840NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
841 SerialProxyResponse, instance, type, status, error_message)
842NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SerialProxyLineStates, rts, dtr)
843NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(SerialProxyModemPins, instance, lines)
Bluetooth proxy subsystem: BLE scanning, connections, and GATT.
Typed view of the device's DeviceInfoResponse.
Local-network discovery of ESPHome devices via mDNS / DNS-SD (service _esphomelib....
std::string name
Definition emit_registry.cpp:14
Typed store of a device's entities: ingest ListEntities*/State messages, query typed info/state per ...
Typed mirrors of the ESPHome protobuf enums.
Typed Lock entity (info + state + command).
Device log streaming subsystem.
TextMode
Mirror of proto enum TextMode.
Definition enums.hpp:364
TemperatureUnit
Mirror of proto enum TemperatureUnit.
Definition enums.hpp:131
LogLevel
Mirror of proto enum LogLevel.
Definition enums.hpp:91
CoverOperation
Mirror of proto enum CoverOperation.
Definition enums.hpp:33
SerialProxyStatus
Mirror of proto enum SerialProxyStatus.
Definition enums.hpp:405
ClimateSwingMode
Mirror of proto enum ClimateSwingMode.
Definition enums.hpp:163
SerialProxyParity
Mirror of proto enum SerialProxyParity.
Definition enums.hpp:391
ColorMode
Mirror of proto enum ColorMode.
Definition enums.hpp:60
FanDirection
Mirror of proto enum FanDirection.
Definition enums.hpp:54
NumberMode
Mirror of proto enum NumberMode.
Definition enums.hpp:217
WaterHeaterMode
Mirror of proto enum WaterHeaterMode.
Definition enums.hpp:194
BluetoothScannerState
Mirror of proto enum BluetoothScannerState.
Definition enums.hpp:282
EntityCategory
Mirror of proto enum EntityCategory.
Definition enums.hpp:20
BluetoothScannerMode
Mirror of proto enum BluetoothScannerMode.
Definition enums.hpp:292
MediaPlayerState
Mirror of proto enum MediaPlayerState.
Definition enums.hpp:236
ClimateMode
Mirror of proto enum ClimateMode.
Definition enums.hpp:138
MediaPlayerFormatPurpose
Mirror of proto enum MediaPlayerFormatPurpose.
Definition enums.hpp:265
ClimatePreset
Mirror of proto enum ClimatePreset.
Definition enums.hpp:182
SensorStateClass
Mirror of proto enum SensorStateClass.
Definition enums.hpp:75
ValveOperation
Mirror of proto enum ValveOperation.
Definition enums.hpp:370
AlarmControlPanelState
Mirror of proto enum AlarmControlPanelState.
Definition enums.hpp:339
ClimateAction
Mirror of proto enum ClimateAction.
Definition enums.hpp:171
SerialProxyRequestType
Mirror of proto enum SerialProxyRequestType.
Definition enums.hpp:398
ClimateFanMode
Mirror of proto enum ClimateFanMode.
Definition enums.hpp:149
LockState
Mirror of proto enum LockState.
Definition enums.hpp:224
SerialProxyPortType
Mirror of proto enum SerialProxyPortType.
Definition enums.hpp:13
LockCommand
Mirror of proto enum LockCommand (not present in the generated enums mirror).
Definition lock.hpp:24
Serial (UART) proxy subsystem.