Skip to content

Commit

Permalink
Implementation of UniqueID. Fixed not adding device if not online at …
Browse files Browse the repository at this point in the history
…boot time (@hoffmann2002). Load Sources is now called on power state change (@hoffmann2022). Entity will be created of not on at boot time (@hoffmann2002)
  • Loading branch information
cinzas committed Sep 22, 2024
1 parent a19d721 commit 2876fb9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions custom_components.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"Enigma component": {
"version": "1.2",
"version": "1.9",
"local_location": "custom_components/enigma/__init__.py",
"remote_location": "https://raw.githubusercontent.com/cinzas/homeassistant-enigma-player/master/enigma/__init__.py",
"visit_repo": "https://github.com/cinzas/homeassistant-enigma-player",
"changelog": "https://github.com/cinzas/homeassistant-enigma-player/releases/latest"
},
"Enigma Media Player": {
"version": "1.2",
"version": "1.9",
"local_location": "custom_components/enigma/media_player.py",
"remote_location": "https://raw.githubusercontent.com/cinzas/homeassistant-enigma-player/master/enigma/media_player.py",
"visit_repo": "https://github.com/cinzas/homeassistant-enigma-player",
"changelog": "https://github.com/cinzas/homeassistant-enigma-player/releases/latest"
},
"Enigma Notification": {
"version": "1.2",
"version": "1.9",
"local_location": "custom_components/enigma/notify.py",
"remote_location": "https://raw.githubusercontent.com/cinzas/homeassistant-enigma-player/master/enigma/notify.py",
"visit_repo": "https://github.com/cinzas/homeassistant-enigma-player",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/enigma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from homeassistant.helpers.entity import Entity

# VERSION
VERSION = '1.8'
VERSION = '1.9'

# REQUIREMENTS
REQUIREMENTS = ['beautifulsoup4==4.6.3']
Expand Down
2 changes: 1 addition & 1 deletion custom_components/enigma/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "enigma",
"name": "Enigma2 addon",
"version" : "1.8",
"version" : "1.9",
"documentation": "https://github.com/cinzas/homeassistant-enigma-player",
"issue_tracker": "https://github.com/cinzas/homeassistant-enigma-player/issues",
"dependencies": [],
Expand Down
7 changes: 6 additions & 1 deletion custom_components/enigma/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from homeassistant.util import Throttle

# VERSION
VERSION = '1.8'
VERSION = '1.9'

# Dependencies
DEPENDENCIES = ['enigma']
Expand Down Expand Up @@ -313,6 +313,11 @@ def name(self):
"""Return the name of the device."""
return self._name

@property
def unique_id(self) -> str:
"""Return a unique, Home Assistant friendly identifier for this entity."""
return str(self._host).replace(".", "_")+"_"+str(self._port)+"_"+str(self._name)

# GET - State
@property
def state(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/enigma/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


# VERSION
VERSION = '1.8'
VERSION = '1.9'

# Default value for display (if not passed as argument in data field)
# 20 seconds for timeout
Expand Down

0 comments on commit 2876fb9

Please sign in to comment.