mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add available property to Ambient PWS (#22092)
* Add available property to Ambient PWS * Linting * remove blank line
This commit is contained in:
parent
9e4bd88a06
commit
7807b40925
@ -411,6 +411,13 @@ class AmbientWeatherEntity(Entity):
|
||||
self._state = None
|
||||
self._station_name = station_name
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
"""Return True if entity is available."""
|
||||
return bool(
|
||||
self._ambient.stations[self._mac_address][ATTR_LAST_DATA].get(
|
||||
self._sensor_type))
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return device registry information for this entity."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user