Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor constants, helper functions, and switch name formatting in xplora_watch component. #271

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading