diff --git a/hasspy/mqtt.py b/hasspy/mqtt.py index 00d9487..d6dc613 100644 --- a/hasspy/mqtt.py +++ b/hasspy/mqtt.py @@ -108,10 +108,11 @@ class HassClient(Client): return { "dev": { "ids": self.node_id, - "name": self.node_id, + "name": self.node_id.capitalize(), }, "o": { - "name": "hasspy", + "name": "HassPy", + "url": "https://git.edgarpierre.fr/edpibu/hasspy", }, "cmps": self.components, "availability_topic": self.availability_topic, @@ -154,14 +155,16 @@ class HassSystemClient(HassClient): "unique_id": f"{self.node_id}_power", "p": "switch", "name": "Power", + "icon": "mdi:power", "payload_off": "POWER_OFF", "payload_on": "POWER_ON", "value_template": "{{ value_json.power }}", }, "lock": { - "unique_id": f"{self.node_id}_power", + "unique_id": f"{self.node_id}_lock", "p": "button", "name": "Lock", + "icon": "mdi:account-lock", "payload_press": "LOCK", }, } @@ -213,12 +216,14 @@ class HassUserClient(HassClient): "unique_id": f"{self.node_id}_play_pause", "p": "button", "name": "Play/Pause", + "icon": "mdi:play-pause", "payload_press": "PLAY_PAUSE", }, "volume": { "unique_id": f"{self.node_id}_volume", "p": "number", "name": "Volume", + "icon": "mdi:volume-high", "command_template": "VOLUME:{{ value }}", "step": 10, "min": 0,