mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
parent
c72a34dbec
commit
378cfab501
@ -44,18 +44,23 @@ async def async_setup_entry(
|
|||||||
MeteoFranceSensor(coordinator_forecast, description)
|
MeteoFranceSensor(coordinator_forecast, description)
|
||||||
for description in SENSOR_TYPES
|
for description in SENSOR_TYPES
|
||||||
]
|
]
|
||||||
entities.extend(
|
# Add rain forecast entity only if location support this feature
|
||||||
[
|
if coordinator_rain:
|
||||||
MeteoFranceRainSensor(coordinator_rain, description)
|
entities.extend(
|
||||||
for description in SENSOR_TYPES_RAIN
|
[
|
||||||
]
|
MeteoFranceRainSensor(coordinator_rain, description)
|
||||||
)
|
for description in SENSOR_TYPES_RAIN
|
||||||
entities.extend(
|
]
|
||||||
[
|
)
|
||||||
MeteoFranceAlertSensor(coordinator_alert, description)
|
# Add weather alert entity only if location support this feature
|
||||||
for description in SENSOR_TYPES_ALERT
|
if coordinator_alert:
|
||||||
]
|
entities.extend(
|
||||||
)
|
[
|
||||||
|
MeteoFranceAlertSensor(coordinator_alert, description)
|
||||||
|
for description in SENSOR_TYPES_ALERT
|
||||||
|
]
|
||||||
|
)
|
||||||
|
# Add weather probability entities only if location support this feature
|
||||||
if coordinator_forecast.data.probability_forecast:
|
if coordinator_forecast.data.probability_forecast:
|
||||||
entities.extend(
|
entities.extend(
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user