diff --git a/src/thermostat/sensor.py b/src/thermostat/sensor.py index 3427711..da341bd 100644 --- a/src/thermostat/sensor.py +++ b/src/thermostat/sensor.py @@ -27,11 +27,20 @@ AVAILABILITY_TOPIC = f"{TOPIC}/availability" I2CPORT = 1 SENSOR_ADDR = 0x77 +DEVICE = { + "manufacturer": "Dustin C. Hatch", + "name": "RPi Thermostat Display", + "model": "RPi Thermostat Display", + "identifiers": [ + os.uname().nodename, + ], +} SENSOR_CONFIG = { "thermostat_temperature": { "device_class": "temperature", "name": "Thermostat Temperature", + "device": DEVICE, "state_topic": TOPIC, "availability_topic": AVAILABILITY_TOPIC, "unit_of_measurement": "°C", @@ -40,6 +49,7 @@ SENSOR_CONFIG = { "thermostat_pressure": { "device_class": "pressure", "name": "Thermostat Pressure", + "device": DEVICE, "state_topic": TOPIC, "availability_topic": AVAILABILITY_TOPIC, "unit_of_measurement": "hPa", @@ -48,6 +58,7 @@ SENSOR_CONFIG = { "thermostat_humidity": { "device_class": "humidity", "name": "Thermostat Humidity", + "device": DEVICE, "state_topic": TOPIC, "availability_topic": AVAILABILITY_TOPIC, "unit_of_measurement": "%",