From 7375002184da4ce9bb8ca1a93aa3326882a5b4bd Mon Sep 17 00:00:00 2001 From: nao-pon Date: Sat, 4 Jan 2025 22:09:18 +0900 Subject: [PATCH] Support Visitor sensor class --- custom_components/echonetlite/const.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/custom_components/echonetlite/const.py b/custom_components/echonetlite/const.py index 96b3b69..9862099 100644 --- a/custom_components/echonetlite/const.py +++ b/custom_components/echonetlite/const.py @@ -132,13 +132,30 @@ ENL_OP_CODES = { 0x00: { # Sensor-related Device + 0x08: { # Visitor sensor class + 0xB0: { + CONF_ICON: "mdi:motion-sensor", + }, # Detection threshold level + 0xB1: { + CONF_ICON: "mdi:motion-sensor", + }, # Visitor detection status + 0xBE: { + TYPE_NUMBER: { + CONF_TYPE: NumberDeviceClass.DURATION, + CONF_UNIT_OF_MEASUREMENT: UnitOfTime.SECONDS, + CONF_MINIMUM: 0, + CONF_MAXIMUM: 0xFFFD, + CONF_MULTIPLIER: 10, + }, + }, # Visitor detection holding time + }, 0x11: { # Temperature sensor 0xE0: { CONF_ICON: "mdi:thermometer", CONF_TYPE: SensorDeviceClass.TEMPERATURE, CONF_STATE_CLASS: SensorStateClass.MEASUREMENT, }, - } + }, }, 0x01: { # Air Conditioner-related Device 0x30: { # Home air conditioner