Skip to content

Commit

Permalink
Rename device_state_attributes to extra_state_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jshufro committed Mar 20, 2022
1 parent ffd906b commit 1fffd54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions noaa_tides/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def update_tide_factor_from_attr(self):
self.attr["tide_factor"] = 50 + (50*math.cos((now - most_recent).seconds * math.pi / predicted_period))

@property
def device_state_attributes(self):
_LOGGER.debug("device_state_attributes queried")
def extra_state_attributes(self):
_LOGGER.debug("extra_state_attributes queried")
"""Return the state attributes of this device."""
if self.attr is None:
self.attr = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
Expand Down Expand Up @@ -213,7 +213,7 @@ class NOAATemperatureSensor(NOAATidesAndCurrentsSensor):
"""Representation of a NOAA Temperature sensor."""

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of this device."""
if self.attr is None:
self.attr = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
Expand Down Expand Up @@ -333,7 +333,7 @@ def unit_of_measurement(self):
return TEMP_CELSIUS if self._unit_system == "metric" else TEMP_FAHRENHEIT

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of this device."""
if self.attr is None:
self.attr = {ATTR_ATTRIBUTION: BUOY_ATTRIBUTION}
Expand Down

0 comments on commit 1fffd54

Please sign in to comment.