Skip to content

Commit

Permalink
Merge pull request #82 from Mrredstone5230/feat/degree-percent
Browse files Browse the repository at this point in the history
Added some missing characters and fixed a warning in HA
  • Loading branch information
gickowtf authored Jun 18, 2024
2 parents acbaad6 + a76d287 commit 8629403
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions custom_components/divoom_pixoo/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def available(self) -> bool | None:
def supported_color_modes(self) -> set[ColorMode] | set[str] | None:
return {ColorMode.BRIGHTNESS}

@property
def color_mode(self) -> ColorMode | str | None:
return ColorMode.BRIGHTNESS

@property
def unique_id(self):
return "light_" + str(self._config_entry.entry_id)
Expand Down
17 changes: 13 additions & 4 deletions custom_components/divoom_pixoo/pixoo64/_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
'|': [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 3], '}': [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 3],
'~': [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3], '$': [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 3],
'@': [0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 3], '%': [1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 3],
' ': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]
' ': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3],
# '°': [1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 2]
'°': [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2]
}

FONT_GICKO = {'0': [0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 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