diff --git a/helpers/update_content.py b/helpers/update_content.py index c59ec35..0305b79 100755 --- a/helpers/update_content.py +++ b/helpers/update_content.py @@ -14,6 +14,21 @@ MANIFEST = "manifest.json" URL = "https://github.com/denysdovhan/home-assistant-config/blob/{commit_hash}/{fname}" +GROUPS_EMOJIS = { + "Alarm": "๐Ÿšจ", + "Alert": "๐Ÿ””", + "Climate": "๐ŸŒก๏ธ", + "Curtains": "๐ŸŒ†", + "Energy": "โšก๏ธ", + "Presence": "๐Ÿ”˜", + "Light": "๐Ÿ’ก", + "Media": "๐ŸŽต", + "Mode": "๐Ÿšฆ", + "System": "๐Ÿ–ฅ๏ธ", + "Vacuum": "๐Ÿงน", + "Water": "๐Ÿ’ฆ", +} + def git_latest_edit_hash(filename): """Get the git hash to save with data to ensure reproducibility.""" git_output = subprocess.check_output( @@ -28,20 +43,7 @@ def to_file(lines): return "".join(lines) def get_emoji(group): - emojis = { - "Alarm": "๐Ÿšจ", - "Alert": "๐Ÿ””", - "Climate": "๐ŸŒก๏ธ", - "Energy": "โšก๏ธ", - "Presence": "๐Ÿ”˜", - "Light": "๐Ÿ’ก", - "Media": "๐ŸŽต", - "Mode": "๐Ÿšฆ", - "System": "๐Ÿ–ฅ๏ธ", - "Vacuum": "๐Ÿงน", - "Water": "๐Ÿ’ฆ", - } - return emojis.get(group, "โš™๏ธ") + return GROUPS_EMOJIS.get(group, "โš™๏ธ") def read_file(fname): with open(fname) as file: