sensor_temp
Temperature and/or humidity sensor
Available device functions
The device can have all the functions listed below or some of them. E.g. if the sensor cannot report the battery charge level, there is no need in including the battery_percentage
function in its model description.
The sensor has a mandatory online
function. Besides, at least one of the humidity
or temperature
functions must be described. E.g. if you describe a temperature sensor, you must list the online
and temperature
functions, and the humidity
function is not required.
If you are describing a temperature and humidity sensor, you must enlist all the three functions: online
, humidity
, temperature
.
Function | Mandatory? | Description |
air_pressure | Current atmospheric pressure | |
battery_low_power | Battery low or not | |
battery_percentage | Batter charge level | |
humidity | ✔︎* | Current humidity. The function is mandatory for humidity sensors and temperature and humidity sensors. For temperature sensors that do not measure humidity, it should not be indicated |
online | ✔︎ | Device availability: offline or online |
sensor_sensitive | Sensor sensitivity | |
signal_strength | Signal strength | |
temp_unit_view | Temperature scale displayed on the sensor screen: C or F. Use it only for sensors with a screen, capable of displaying temperature according to several temperature scales | |
temperature | ✔︎* | Current temperature. The function is mandatory for humidity sensors and temperature and humidity sensors. For humidity sensors that do not measure temperature, it should not be indicated |
Temperature and humidity sensor model description example
The model shall be described in accordance with the model structure. The example describes a temperature and humidity sensor that can report temperature, humidity and atmospheric pressure. The sensor also reports signal strength, battery charge level and whether the battery is low. Besides, its sensitivity level can be adjusted as appropriate. The sensor has a screen and can display temperature in C and F.
In addition, the model's allowed values for the sensor_sensitive
function have been changed: it supports only two sensitivity levels. The medium
level is not supported and has been deleted.
{
"id": "QWERTY124",
"manufacturer": "Xiaqara",
"model": "SM1123456789",
"hw_version": "3.1",
"sw_version": "5.6",
"description": "Xiaqara smart temperature and humidity sensor",
"category": "sensor_temp",
"features": [
"online",
"humidity",
"temperature",
"air_pressure",
"battery_low_power",
"battery_percentage",
"sensor_sensitive",
"signal_strength",
"temp_unit_view"
],
"allowed_values": {
"sensor_sensitive": {
"type": "ENUM",
"enum_values": {
"values": [
"auto",
"high"
]
}
}
}
}
Temperature and humidity sensor description example
The device shall be describe in accordance with the device structure. The example contains no sensor model description as we believe that models are described independently and the model ID will be enough (in this case, QWERTY124).
For the sensor, parent_id
is indicated – a hub ID through which the sensor is connected to the Smart Home.
{
"id": "ABCD_004",
"parent_id": "A_002",
"name": "My temperature and humidity sensor",
"default_name": "Smart temperature and humidity sensor",
"nicknames": ["Microclimate sensor", "Temperature probe"],
"home": "My home",
"room": "Living room",
"model_id": "QWERTY124",
"hw_version": "3.1",
"sw_version": "5.6",
"partner_meta": {
"internal-id": 1234,
"specificity": "microchip 2A"
},
}