Update naming to prefer channel name. Use pyemvue 0.9.7 to pull in expansion data.

This commit is contained in:
magico13
2020-06-04 20:48:16 -04:00
parent 8e5159e8d3
commit 4aaa7fccc1
2 changed files with 5 additions and 3 deletions

View File

@@ -2,9 +2,9 @@
"domain": "emporia_vue",
"name": "Emporia Vue",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/emporia_vue",
"documentation": "https://github.com/magico13/ha-emporia-vue",
"requirements": [
"pyemvue==0.9.6"
"pyemvue==0.9.7"
],
"ssdp": [],
"zeroconf": [],

View File

@@ -33,11 +33,13 @@ class CurrentVuePowerSensor(Entity):
self._vue = vue
self._device = device
self._channel = channel
dName = channel.name or device.device_name
self._name = f'Power {dName} {self._channel.channel_num}'
@property
def name(self):
"""Return the name of the sensor."""
return f'Power {self._device.device_name} {self._channel.channel_num}'
return self._name
@property
def state(self):