Add velbus buttons platform (#73323)

This commit is contained in:
Maikel Punie 2022-06-28 18:41:29 +02:00 committed by GitHub
parent 9fef1004a2
commit 040ece76ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 5 deletions

View file

@ -53,9 +53,9 @@ class VelbusSensor(VelbusEntity, SensorEntity):
self._attr_name = f"{self._attr_name}-counter"
# define the device class
if self._is_counter:
self._attr_device_class = SensorDeviceClass.ENERGY
elif channel.is_counter_channel():
self._attr_device_class = SensorDeviceClass.POWER
elif channel.is_counter_channel():
self._attr_device_class = SensorDeviceClass.ENERGY
elif channel.is_temperature():
self._attr_device_class = SensorDeviceClass.TEMPERATURE
# define the icon