Skip to content

Commit

Permalink
Refactor constants, helper functions, and switch name formatting in `…
Browse files Browse the repository at this point in the history
…xplora_watch` component.

Signed-off-by: Ludy87 <[email protected]>
  • Loading branch information
Ludy87 committed Oct 1, 2023
1 parent 72a86f0 commit 1e904f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/xplora_watch/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,5 @@
select:
options:
- all
""",
""", # noqa: E501
}
1 change: 1 addition & 0 deletions custom_components/xplora_watch/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def encoded_base64_string_to_mp3_file(hass: HomeAssistant, base64_string: str, f
async def create_www_directory(hass: HomeAssistant):
"""Create www directory."""
paths = [
hass.config.path("www"), # http://homeassistant.local:8123/local
hass.config.path("www/image"), # http://homeassistant.local:8123/local/image/<filename>.jpeg
hass.config.path("www/video"), # http://homeassistant.local:8123/local/video/<filename>.mp4
hass.config.path("www/video/thumb"), # http://homeassistant.local:8123/local/video/thumb/<filename>.jpeg
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xplora_watch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"pydub",
"marshmallow-enum"
],
"version": "v2.10.2"
"version": "v2.10.3"
}
2 changes: 1 addition & 1 deletion custom_components/xplora_watch/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def __init__(

self._silent = silent

self._attr_name: str = f'{ward.get(CONF_NAME)} {ATTR_WATCH} {description.key} {silent["start"]}-{silent["end"]} ({coordinator.username})'.replace(
self._attr_name: str = f'{ward.get(CONF_NAME)} {ATTR_WATCH} {description.key} {silent["start"]}-{silent["end"]} ({coordinator.username})'.replace( # noqa: E501
"_", " "
).title()

Expand Down

0 comments on commit 1e904f9

Please sign in to comment.