Skip to content

Commit

Permalink
Fix a couple of typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
loopj committed Jan 8, 2025
1 parent 5cd4a1c commit 06f3f61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/vantage/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ async def async_step_reauth(
self, _entry_data: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Perform reauth after controller authentication error."""
self.reauth_entry = self.hass.config_entries.async_get_entry(
self.context["entry_id"]
)
if not (entry_id := self.context.get("entry_id")):
return self.async_abort(reason="unknown")

self.reauth_entry = self.hass.config_entries.async_get_entry(entry_id)

return await self.async_step_reauth_confirm()

Expand Down
2 changes: 2 additions & 0 deletions custom_components/vantage/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def __post_init__(self) -> None:
case "Temperature":
self._attr_device_class = SensorDeviceClass.TEMPERATURE
self._attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
case _:
pass

@property
def native_value(self) -> int | Decimal | None:
Expand Down

0 comments on commit 06f3f61

Please sign in to comment.