Skip to content

Commit

Permalink
Use const for deprecated pressure unit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed May 7, 2024
1 parent f4d2749 commit 6b67285
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions custom_components/yandex_smart_home/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
CONF_ENTITY_CUSTOM_RANGE_DECREASE_VALUE = "decrease_value"
CONF_DEVICES_DISCOVERED = "devices_discovered"

ISSUE_ID_DEPRECATED_PRESSURE_UNIT = "deprecated_pressure_unit"
ISSUE_ID_DEPRECATED_YAML_NOTIFIER = "deprecated_yaml_notifier"
ISSUE_ID_DEPRECATED_YAML_SEVERAL_NOTIFIERS = "deprecated_yaml_several_notifiers"
ISSUE_ID_MISSING_INTEGRATION = "missing_integration"
Expand Down
5 changes: 3 additions & 2 deletions custom_components/yandex_smart_home/entry_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
CONF_SKILL,
CONF_USER_ID,
DOMAIN,
ISSUE_ID_DEPRECATED_PRESSURE_UNIT,
ISSUE_ID_DEPRECATED_YAML_NOTIFIER,
ISSUE_ID_DEPRECATED_YAML_SEVERAL_NOTIFIERS,
ConnectionType,
Expand Down Expand Up @@ -91,10 +92,10 @@ async def async_setup(self) -> Self:
ir.async_create_issue(
self._hass,
DOMAIN,
"deprecated_pressure_unit",
ISSUE_ID_DEPRECATED_PRESSURE_UNIT,
is_fixable=False,
severity=ir.IssueSeverity.WARNING,
translation_key="deprecated_pressure_unit",
translation_key=ISSUE_ID_DEPRECATED_PRESSURE_UNIT,
learn_more_url="https://docs.yaha-cloud.ru/master/devices/sensor/float/#unit-conversion",
)
else:
Expand Down

0 comments on commit 6b67285

Please sign in to comment.