EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
Classes | Enumerations | Variables
haEntity.h File Reference

Defines an entity for Home Assistant autodiscovery. More...

#include <Arduino.h>
#include "EnigmaIoTconfig.h"
#include <ArduinoJson.h>
#include <EnigmaIOTdebug.h>
#include <helperFunctions.h>

Go to the source code of this file.

Classes

class  HAEntity
 

Enumerations

enum  haDeviceType_t {
  UNDEFINED, ALARM_PANEL, BINARY_SENSOR, CAMERA,
  COVER, DEVICE_TRACKER, DEVICE_TRIGGER, FAN,
  HVAC, LIGHT, LOCK, SCENE,
  SENSOR, SWITCH, TAG_SCANNER, VACUUM
}
 
enum  haBinarySensorClass_t {
  bs_none, bs_battery, bs_battery_charging, bs_cold,
  bs_connectivity, bs_door, bs_garage_door, bs_gas,
  bs_heat, bs_light, bs_lock, bs_moisture,
  bs_motion, bs_moving, bs_occupancy, bs_opening,
  bs_plug, bs_power, bs_presence, bs_problem,
  bs_safety, bs_smoke, bs_sound, bs_vibration,
  bs_window
}
 
enum  haCoverClass_t {
  cover_none, cover_awning, cover_blind, cover_curtain,
  cover_damper, cover_door, cover_garage, cover_gate,
  cover_shade, cover_shutter, cover_window
}
 
enum  haSensorClass_t {
  sensor_none, sensor_battery, sensor_current, sensor_energy,
  sensor_humidity, sensor_illuminance, sensor_signal_strength, sensor_temperature,
  sensor_power, sensor_power_factor, sensor_pressure, sensor_timestamp,
  sensor_voltage
}
 

Variables

constexpr auto ha_device_type = "type"
 
constexpr auto ha_device_class = "dev_cla"
 
constexpr auto ha_payload_on = "pl_on"
 
constexpr auto ha_payload_off = "pl_off"
 
constexpr auto ha_value_key = "val"
 
constexpr auto ha_value_template = "val_tpl"
 
constexpr auto ha_expiration = "exp_aft"
 
constexpr auto ha_payload_open = "pl_open"
 
constexpr auto ha_payload_close = "pl_cls"
 
constexpr auto ha_payload_stop = "pl_stop"
 
constexpr auto ha_set_position_template = "set_pos_tpl"
 
constexpr auto ha_position_open = "pos_open"
 
constexpr auto ha_position_closed = "pos_clsd"
 
constexpr auto ha_payload_goto = "pl_goto"
 
constexpr auto ha_payload = "pl"
 
constexpr auto ha_state_open = "stat_open"
 
constexpr auto ha_state_opening = "stat_opening"
 
constexpr auto ha_state_closed = "stat_clsd"
 
constexpr auto ha_state_closing = "stat_closing"
 
constexpr auto ha_state_stopped = "stat_stopped"
 
constexpr auto ha_state_on = "stat_on"
 
constexpr auto ha_state_off = "stat_off"
 
constexpr auto ha_off_delay = "off_dly"
 
constexpr auto ha_unit_of_measurement = "unit_of_meas"
 
constexpr auto ha_name_sufix = "nmsfx"
 
constexpr auto ha_allow_attrib = "attr"
 
constexpr auto ha_type = "ttype"
 
constexpr auto ha_subtype = "tstype"
 

Detailed Description

Defines an entity for Home Assistant autodiscovery.

Version
0.9.8
Date
15/07/2021
Author
German Martin
   https://www.home-assistant.io/docs/mqtt/discovery/

Definition in file haEntity.h.

Enumeration Type Documentation

◆ haBinarySensorClass_t

Enumerator
bs_none 
bs_battery 
bs_battery_charging 
bs_cold 
bs_connectivity 
bs_door 
bs_garage_door 
bs_gas 
bs_heat 
bs_light 
bs_lock 
bs_moisture 
bs_motion 
bs_moving 
bs_occupancy 
bs_opening 
bs_plug 
bs_power 
bs_presence 
bs_problem 
bs_safety 
bs_smoke 
bs_sound 
bs_vibration 
bs_window 

Definition at line 73 of file haEntity.h.

◆ haCoverClass_t

Enumerator
cover_none 
cover_awning 
cover_blind 
cover_curtain 
cover_damper 
cover_door 
cover_garage 
cover_gate 
cover_shade 
cover_shutter 
cover_window 

Definition at line 102 of file haEntity.h.

◆ haDeviceType_t

Enumerator
UNDEFINED 
ALARM_PANEL 
BINARY_SENSOR 
CAMERA 
COVER 
DEVICE_TRACKER 
DEVICE_TRIGGER 
FAN 
HVAC 
LIGHT 
LOCK 
SCENE 
SENSOR 
SWITCH 
TAG_SCANNER 
VACUUM 

Definition at line 53 of file haEntity.h.

◆ haSensorClass_t

Enumerator
sensor_none 
sensor_battery 
sensor_current 
sensor_energy 
sensor_humidity 
sensor_illuminance 
sensor_signal_strength 
sensor_temperature 
sensor_power 
sensor_power_factor 
sensor_pressure 
sensor_timestamp 
sensor_voltage 

Definition at line 116 of file haEntity.h.

Variable Documentation

◆ ha_allow_attrib

constexpr auto ha_allow_attrib = "attr"
constexpr

Definition at line 48 of file haEntity.h.

◆ ha_device_class

constexpr auto ha_device_class = "dev_cla"
constexpr

Definition at line 24 of file haEntity.h.

◆ ha_device_type

constexpr auto ha_device_type = "type"
constexpr

Definition at line 23 of file haEntity.h.

◆ ha_expiration

constexpr auto ha_expiration = "exp_aft"
constexpr

Definition at line 29 of file haEntity.h.

◆ ha_name_sufix

constexpr auto ha_name_sufix = "nmsfx"
constexpr

Definition at line 47 of file haEntity.h.

◆ ha_off_delay

constexpr auto ha_off_delay = "off_dly"
constexpr

Definition at line 45 of file haEntity.h.

◆ ha_payload

constexpr auto ha_payload = "pl"
constexpr

Definition at line 37 of file haEntity.h.

◆ ha_payload_close

constexpr auto ha_payload_close = "pl_cls"
constexpr

Definition at line 31 of file haEntity.h.

◆ ha_payload_goto

constexpr auto ha_payload_goto = "pl_goto"
constexpr

Definition at line 36 of file haEntity.h.

◆ ha_payload_off

constexpr auto ha_payload_off = "pl_off"
constexpr

Definition at line 26 of file haEntity.h.

◆ ha_payload_on

constexpr auto ha_payload_on = "pl_on"
constexpr

Definition at line 25 of file haEntity.h.

◆ ha_payload_open

constexpr auto ha_payload_open = "pl_open"
constexpr

Definition at line 30 of file haEntity.h.

◆ ha_payload_stop

constexpr auto ha_payload_stop = "pl_stop"
constexpr

Definition at line 32 of file haEntity.h.

◆ ha_position_closed

constexpr auto ha_position_closed = "pos_clsd"
constexpr

Definition at line 35 of file haEntity.h.

◆ ha_position_open

constexpr auto ha_position_open = "pos_open"
constexpr

Definition at line 34 of file haEntity.h.

◆ ha_set_position_template

constexpr auto ha_set_position_template = "set_pos_tpl"
constexpr

Definition at line 33 of file haEntity.h.

◆ ha_state_closed

constexpr auto ha_state_closed = "stat_clsd"
constexpr

Definition at line 40 of file haEntity.h.

◆ ha_state_closing

constexpr auto ha_state_closing = "stat_closing"
constexpr

Definition at line 41 of file haEntity.h.

◆ ha_state_off

constexpr auto ha_state_off = "stat_off"
constexpr

Definition at line 44 of file haEntity.h.

◆ ha_state_on

constexpr auto ha_state_on = "stat_on"
constexpr

Definition at line 43 of file haEntity.h.

◆ ha_state_open

constexpr auto ha_state_open = "stat_open"
constexpr

Definition at line 38 of file haEntity.h.

◆ ha_state_opening

constexpr auto ha_state_opening = "stat_opening"
constexpr

Definition at line 39 of file haEntity.h.

◆ ha_state_stopped

constexpr auto ha_state_stopped = "stat_stopped"
constexpr

Definition at line 42 of file haEntity.h.

◆ ha_subtype

constexpr auto ha_subtype = "tstype"
constexpr

Definition at line 50 of file haEntity.h.

◆ ha_type

constexpr auto ha_type = "ttype"
constexpr

Definition at line 49 of file haEntity.h.

◆ ha_unit_of_measurement

constexpr auto ha_unit_of_measurement = "unit_of_meas"
constexpr

Definition at line 46 of file haEntity.h.

◆ ha_value_key

constexpr auto ha_value_key = "val"
constexpr

Definition at line 27 of file haEntity.h.

◆ ha_value_template

constexpr auto ha_value_template = "val_tpl"
constexpr

Definition at line 28 of file haEntity.h.