Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Sep 12, 2023
1 parent 7bdecfc commit 63113ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dali2mqtt.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Description=dali2mqtt
After=network.target

[Service]
ExecStart=/home/dgomes/dali2mqtt/venv/bin/python3 dali-mqtt-daemon.py
WorkingDirectory=/home/dgomes/dali2mqtt
ExecStart=/opt/dali2mqtt/venv/bin/python3 dali-mqtt-daemon.py
WorkingDirectory=/opt/dali2mqtt
StandardOutput=inherit
StandardError=inherit
Environment=PYTHONUNBUFFERED=true
Restart=always
User=dali
User=root

[Install]
WantedBy=multi-user.target
8 changes: 5 additions & 3 deletions devicesnamesconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def is_devices_file_empty(self) -> bool:

def get_friendly_name(self, short_address_value) -> str:
"""Retrieve friendly_name."""
return self._devices_names[short_address_value].get(
"friendly_name", f"{short_address_value}"
)
if short_address_value in self._devices_names:
return self._devices_names[short_address_value].get(
"friendly_name", f"{short_address_value}"
)
return str(short_address_value)
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
hidapi==0.11.2
hid==1.0.5
hidapi==0.14.0
paho-mqtt==1.6.1
python-dali==0.9
python-slugify==6.1.1
pyusb==1.2.1
PyYAML==6.0
PyYAML==6.0.1
text-unidecode==1.3
voluptuous==0.13.1
watchdog==2.1.7

0 comments on commit 63113ab

Please sign in to comment.