Skip to content

Commit

Permalink
doctweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Oct 30, 2024
1 parent 5fc967a commit 3c03c85
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/evohomeasync2/schema/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ def _factory_user_account(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:
)


# GET /userAccount
SCH_USER_ACCOUNT: Final = _factory_user_account(snake_to_camel)
16 changes: 11 additions & 5 deletions src/evohomeasync2/schema/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def _factory_system_mode_temp(fnc: Callable[[str], str] = do_nothing) -> vol.Sch
)


def _factory_schedule_capabilities_response(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:
def _factory_schedule_capabilities_response(
fnc: Callable[[str], str] = do_nothing,
) -> vol.Schema:
"""Factory for the schedule_capabilities_response schema."""

return vol.Schema(
Expand Down Expand Up @@ -315,7 +317,9 @@ def _factory_time_zone(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:
)


def _factory_locations_installation_info(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:
def _factory_locations_installation_info(
fnc: Callable[[str], str] = do_nothing,
) -> vol.Schema:
"""Factory for the location (config) schema."""

SCH_LOCATION_OWNER: Final = vol.Schema(
Expand Down Expand Up @@ -353,7 +357,9 @@ def _factory_locations_installation_info(fnc: Callable[[str], str] = do_nothing)
)


def _factory_user_locations_installation_info(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:
def _factory_user_locations_installation_info(
fnc: Callable[[str], str] = do_nothing,
) -> vol.Schema:
"""Factory for the user locations (config) schema."""

return vol.Schema(
Expand All @@ -372,11 +378,11 @@ def _factory_user_locations_installation_info(fnc: Callable[[str], str] = do_not

SCH_TIME_ZONE: Final = _factory_time_zone(snake_to_camel)

# /location/{location_id}/installationInfo?includeTemperatureControlSystems=True
# GET /location/{location_id}/installationInfo?includeTemperatureControlSystems=True
SCH_LOCATION_INSTALLATION_INFO: Final = _factory_locations_installation_info(
snake_to_camel
)
# /location/installationInfo?userId={user_id}&includeTemperatureControlSystems=True
# GET /location/installationInfo?userId={user_id}&includeTemperatureControlSystems=True
SCH_USER_LOCATIONS_INSTALLATION_INFO: Final = _factory_user_locations_installation_info(
snake_to_camel
)
6 changes: 4 additions & 2 deletions src/evohomeasync2/schema/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def _factory_system_mode_status(fnc: Callable[[str], str] = do_nothing) -> vol.A
str(SystemMode.CUSTOM),
str(SystemMode.DAY_OFF),
),
vol.Required(fnc(SZ_TIME_UNTIL)): vol.Datetime(format="%Y-%m-%dT%H:%M:%SZ"),
vol.Required(fnc(SZ_TIME_UNTIL)): vol.Datetime(
format="%Y-%m-%dT%H:%M:%SZ"
),
vol.Required(fnc(SZ_IS_PERMANENT)): False,
}
),
Expand Down Expand Up @@ -222,5 +224,5 @@ def _factory_loc_status(fnc: Callable[[str], str] = do_nothing) -> vol.Schema:

SCH_GWY_STATUS: Final = _factory_gwy_status(snake_to_camel)

# location/{location_id}/status?includeTemperatureControlSystems=True
# GET /location/{location_id}/status?includeTemperatureControlSystems=True
SCH_LOC_STATUS: Final = _factory_loc_status(snake_to_camel)

0 comments on commit 3c03c85

Please sign in to comment.