Skip to content

Commit 5bc478a

Browse files
committed
Reorder methods
1 parent adc25ca commit 5bc478a

File tree

1 file changed

+5
-5
lines changed
  • homeassistant/components/jewish_calendar

1 file changed

+5
-5
lines changed

homeassistant/components/jewish_calendar/sensor.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -251,18 +251,18 @@ def __init__(
251251
elif description.key == "holiday":
252252
self._attr_options = HolidayDatabase(self.data.diaspora).get_all_names()
253253

254+
async def async_added_to_hass(self) -> None:
255+
"""Call when entity is added to hass."""
256+
await super().async_added_to_hass()
257+
await self.async_update_data()
258+
254259
@property
255260
def native_value(self) -> str | int | dt.datetime | None:
256261
"""Return the state of the sensor."""
257262
if self.data.results is None:
258263
return None
259264
return self.entity_description.value_fn(self.data.results)
260265

261-
async def async_added_to_hass(self) -> None:
262-
"""Call when entity is added to hass."""
263-
await super().async_added_to_hass()
264-
await self.async_update_data()
265-
266266
@property
267267
def extra_state_attributes(self) -> dict[str, str]:
268268
"""Return the state attributes."""

0 commit comments

Comments
 (0)