Skip to content

Commit

Permalink
docs: Publish for v1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Nov 20, 2024
1 parent 8cf97e9 commit e8a76d3
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 58 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ jobs:
- name: Deploy docs
run: |
poetry run mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}
VERSION="${GITHUB_REF_NAME}"
[ "${GITHUB_REF_NAME}" == "dev" ] && VERSION="v1.0.x"
poetry run mike deploy --push --branch gh-pages "${VERSION}"
2 changes: 1 addition & 1 deletion custom_components/yandex_smart_home/capability_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def get_ha_scene_by_yandex_scene(self, yandex_scene: ColorScene) -> str:

raise APIError(
ResponseCode.INVALID_VALUE,
f"Unsupported scene '{yandex_scene}' for {self}, see https://docs.yaha-cloud.ru/dev/config/modes/",
f"Unsupported scene '{yandex_scene}' for {self}, see https://docs.yaha-cloud.ru/v1.0.x/config/modes/",
)

def get_description(self) -> None:
Expand Down
6 changes: 3 additions & 3 deletions custom_components/yandex_smart_home/capability_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def get_yandex_mode_by_ha_mode(self, ha_mode: str, hide_warnings: bool = False)
_LOGGER.warning(
f"Failed to get Yandex mode for mode '{ha_mode}' for {self}. "
f"It may cause inconsistencies between Yandex and HA. "
f"See https://docs.yaha-cloud.ru/dev/config/modes/"
f"See https://docs.yaha-cloud.ru/v1.0.x/config/modes/"
)

return mode
Expand All @@ -260,7 +260,7 @@ def get_ha_mode_by_yandex_mode(self, yandex_mode: ModeCapabilityMode) -> str:

raise APIError(
ResponseCode.INVALID_VALUE,
f"Unsupported mode '{yandex_mode}' for {self}, see https://docs.yaha-cloud.ru/dev/config/modes/",
f"Unsupported mode '{yandex_mode}' for {self}, see https://docs.yaha-cloud.ru/v1.0.x/config/modes/",
)

@abstractmethod
Expand Down Expand Up @@ -836,7 +836,7 @@ async def set_instance_state(self, context: Context, state: ModeCapabilityInstan
if not ha_modes:
raise APIError(
ResponseCode.INVALID_VALUE,
f"Unsupported mode '{state.value}' for {self}, see https://docs.yaha-cloud.ru/dev/config/modes/",
f"Unsupported mode '{state.value}' for {self}, see https://docs.yaha-cloud.ru/v1.0.x/config/modes/",
)

ha_mode = self._convert_mapping_speed_value(ha_modes[0])
Expand Down
24 changes: 12 additions & 12 deletions custom_components/yandex_smart_home/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def property_type(value: str) -> str:
except ValueError:
raise vol.Invalid(
f"Event property type '{instance}' is not supported, "
f"see valid event types at https://docs.yaha-cloud.ru/dev/devices/sensor/event/#type"
f"see valid event types at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/event/#type"
)

if value.startswith(f"{PropertyInstanceType.FLOAT}."):
Expand All @@ -98,7 +98,7 @@ def property_type(value: str) -> str:
except ValueError:
raise vol.Invalid(
f"Float property type '{instance}' is not supported, "
f"see valid float types at https://docs.yaha-cloud.ru/dev/devices/sensor/float/#type"
f"see valid float types at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/float/#type"
)

for enum in [FloatPropertyInstance, EventPropertyInstance]:
Expand All @@ -121,8 +121,8 @@ def property_type(value: str) -> str:

raise vol.Invalid(
f"Property type '{value}' is not supported, "
f"see valid types at https://docs.yaha-cloud.ru/dev/devices/sensor/event/#type and "
f"https://docs.yaha-cloud.ru/dev/devices/sensor/float/#type"
f"see valid types at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/event/#type and "
f"https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/float/#type"
)


Expand Down Expand Up @@ -155,7 +155,7 @@ def property_attributes(value: ConfigType) -> ConfigType:
raise vol.Invalid(
f"Target unit of measurement '{target_unit_of_measurement}' is not supported "
f"for {property_type_value} property, see valid values "
f"at https://docs.yaha-cloud.ru/dev/devices/sensor/float/#property-target-unit-of-measurement"
f"at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/float/#property-target-unit-of-measurement"
)

return value
Expand All @@ -170,7 +170,7 @@ def mode_instance(value: str) -> str:
except ValueError:
_LOGGER.error(
f"Mode instance '{value}' is not supported, "
f"see valid modes at https://docs.yaha-cloud.ru/dev/advanced/capabilities/mode/#instance"
f"see valid modes at https://docs.yaha-cloud.ru/v1.0.x/advanced/capabilities/mode/#instance"
)
raise vol.Invalid(f"Mode instance '{value}' is not supported")

Expand All @@ -188,7 +188,7 @@ def mode(value: str) -> str:
_LOGGER.error(
f"Mode '{value}' is not supported, "
f"see valid modes at https://yandex.ru/dev/dialogs/smart-home/doc/concepts/mode-instance-modes.html and "
f"https://docs.yaha-cloud.ru/dev/devices/light/#scene-list"
f"https://docs.yaha-cloud.ru/v1.0.x/devices/light/#scene-list"
)

raise vol.Invalid(f"Mode '{value}' is not supported")
Expand All @@ -200,7 +200,7 @@ def event_instance(value: str) -> str:
except ValueError:
_LOGGER.error(
f"Event instance '{value}' is not supported, "
f"see valid event types at https://docs.yaha-cloud.ru/dev/devices/sensor/event/#event-types"
f"see valid event types at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/event/#event-types"
)
raise vol.Invalid(f"Event instance '{value}' is not supported")

Expand All @@ -214,7 +214,7 @@ def event_map(value: dict[str, dict[str, list[str]]]) -> dict[str, dict[str, lis
if event not in supported_events:
_LOGGER.error(
f"Event '{event}' is not supported for '{instance}' event instance, "
f"see valid event types at https://docs.yaha-cloud.ru/dev/devices/sensor/event/#event-types"
f"see valid event types at https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/event/#event-types"
)
raise vol.Invalid(f"Event '{event}' is not supported for '{instance}' event instance")

Expand All @@ -227,7 +227,7 @@ def toggle_instance(value: str) -> str:
except ValueError:
_LOGGER.error(
f"Toggle instance '{value}' is not supported, "
f"see valid values at https://docs.yaha-cloud.ru/dev/advanced/capabilities/toggle/#instance"
f"see valid values at https://docs.yaha-cloud.ru/v1.0.x/advanced/capabilities/toggle/#instance"
)
raise vol.Invalid(f"Toggle instance '{value}' is not supported")

Expand All @@ -240,7 +240,7 @@ def range_instance(value: str) -> str:
except ValueError:
_LOGGER.error(
f"Range instance '{value}' is not supported, "
f"see valid values at https://docs.yaha-cloud.ru/dev/advanced/capabilities/range/#instance"
f"see valid values at https://docs.yaha-cloud.ru/v1.0.x/advanced/capabilities/range/#instance"
)
raise vol.Invalid(f"Range instance '{value}' is not supported")

Expand Down Expand Up @@ -285,7 +285,7 @@ def color_name(value: str) -> str:
except ValueError:
_LOGGER.error(
f"Color name '{value}' is not supported, "
f"see valid values at https://docs.yaha-cloud.ru/dev/devices/light/#color-profile-config"
f"see valid values at https://docs.yaha-cloud.ru/v1.0.x/devices/light/#color-profile-config"
)
raise vol.Invalid(f"Color name '{value}' is not supported")

Expand Down
4 changes: 2 additions & 2 deletions custom_components/yandex_smart_home/entry_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def async_setup(self) -> Self:
is_fixable=False,
severity=ir.IssueSeverity.WARNING,
translation_key=ISSUE_ID_DEPRECATED_PRESSURE_UNIT,
learn_more_url="https://docs.yaha-cloud.ru/dev/devices/sensor/float/#unit-conversion",
learn_more_url="https://docs.yaha-cloud.ru/v1.0.x/devices/sensor/float/#unit-conversion",
)
else:
ir.async_delete_issue(self._hass, DOMAIN, "deprecated_pressure_unit")
Expand All @@ -142,7 +142,7 @@ async def async_setup(self) -> Self:
is_fixable=False,
severity=ir.IssueSeverity.WARNING,
translation_key=issue_id,
learn_more_url="https://docs.yaha-cloud.ru/dev/breaking-changes/#v1-notifier",
learn_more_url="https://docs.yaha-cloud.ru/v1.0.x/breaking-changes/#v1-notifier",
)
else:
ir.async_delete_issue(self._hass, DOMAIN, ISSUE_ID_DEPRECATED_YAML_NOTIFIER)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/yandex_smart_home/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "yandex_smart_home",
"name": "Yandex Smart Home",
"config_flow": true,
"documentation": "https://docs.yaha-cloud.ru/dev/",
"documentation": "https://docs.yaha-cloud.ru/v1.0.x/",
"issue_tracker": "https://github.com/dext0r/yandex_smart_home/issues",
"requirements": [],
"after_dependencies": ["local_calendar"],
Expand Down
Loading

0 comments on commit e8a76d3

Please sign in to comment.