Skip to content

Commit

Permalink
Merge pull request #1 from maffmeier/main
Browse files Browse the repository at this point in the history
Fix Problem with German umlauts
  • Loading branch information
tjaehnel authored Jun 18, 2024
2 parents 18ff4fc + 06c5e49 commit 38bfb4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ services:
velux:
container_name: vlxmqttha
image: ghcr.io/tjaehnel/vlxmqttha:latest
restart: always
volumes:
- ./vlxmqttha.conf:/vlxmqttha.conf
restart: unless-stopped
3 changes: 2 additions & 1 deletion vlxmqttha.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ async def vlxnode_callback(self, vlxnode):
mqttDevice.updateNode()

def generate_id(self, vlxnode):
return "vlx-" + vlxnode.name.replace(" ", "-").lower()
umlauts = {ord('ä'):'ae', ord('ü'):'ue', ord('ö'):'oe', ord('ß'):'ss'}
return "vlx-" + vlxnode.name.replace(" ", "-").lower().translate(umlauts)

def __del__(self):
for mqttDeviceId in self.mqttDevices:
Expand Down

0 comments on commit 38bfb4e

Please sign in to comment.