mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 17:18:23 +00:00
Add Precipitation sensors to Weatherflow Cloud (#149619)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
91be25a292
commit
99ee56a4dd
@ -34,6 +34,60 @@
|
||||
"lightning_strike_last_epoch": {
|
||||
"default": "mdi:lightning-bolt"
|
||||
},
|
||||
|
||||
"precip_accum_local_day": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"0.01": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
"precip_accum_local_day_final": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"0.01": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
"precip_accum_local_yesterday": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"0.01": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
"precip_accum_local_yesterday_final": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"0.01": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
|
||||
"precip_minutes_local_day": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"1": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
"precip_minutes_local_yesterday": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"1": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
"precip_minutes_local_yesterday_final": {
|
||||
"default": "mdi:umbrella-closed",
|
||||
"range": {
|
||||
"1": "mdi:umbrella"
|
||||
}
|
||||
},
|
||||
|
||||
"precip_analysis_type_yesterday": {
|
||||
"default": "mdi:radar",
|
||||
"state": {
|
||||
"rain": "mdi:weather-rainy",
|
||||
"snow": "mdi:weather-snowy",
|
||||
"rain_snow": "mdi:weather-snoy-rainy",
|
||||
"lightning": "mdi:weather-lightning-rainy"
|
||||
}
|
||||
},
|
||||
"sea_level_pressure": {
|
||||
"default": "mdi:gauge"
|
||||
},
|
||||
@ -49,6 +103,7 @@
|
||||
"wind_chill": {
|
||||
"default": "mdi:snowflake-thermometer"
|
||||
},
|
||||
|
||||
"wind_direction": {
|
||||
"default": "mdi:compass",
|
||||
"range": {
|
||||
|
@ -39,6 +39,14 @@ from .const import DOMAIN
|
||||
from .coordinator import WeatherFlowObservationCoordinator, WeatherFlowWindCoordinator
|
||||
from .entity import WeatherFlowCloudEntity
|
||||
|
||||
PRECIPITATION_TYPE = {
|
||||
0: "none",
|
||||
1: "rain",
|
||||
2: "snow",
|
||||
3: "sleet",
|
||||
4: "storm",
|
||||
}
|
||||
|
||||
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class WeatherFlowCloudSensorEntityDescription(
|
||||
@ -223,6 +231,81 @@ WF_SENSORS: tuple[WeatherFlowCloudSensorEntityDescription, ...] = (
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=3,
|
||||
),
|
||||
# Rain Sensors
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_accum_last_1hr",
|
||||
translation_key="precip_accum_last_1hr",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_accum_last_1hr,
|
||||
native_unit_of_measurement=UnitOfLength.MILLIMETERS,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_accum_local_day",
|
||||
translation_key="precip_accum_local_day",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_accum_local_day,
|
||||
native_unit_of_measurement=UnitOfLength.MILLIMETERS,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_accum_local_day_final",
|
||||
translation_key="precip_accum_local_day_final",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_accum_local_day_final,
|
||||
native_unit_of_measurement=UnitOfLength.MILLIMETERS,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_accum_local_yesterday",
|
||||
translation_key="precip_accum_local_yesterday",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_accum_local_yesterday,
|
||||
native_unit_of_measurement=UnitOfLength.MILLIMETERS,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_accum_local_yesterday_final",
|
||||
translation_key="precip_accum_local_yesterday_final",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_accum_local_yesterday_final,
|
||||
native_unit_of_measurement=UnitOfLength.MILLIMETERS,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_analysis_type_yesterday",
|
||||
translation_key="precip_analysis_type_yesterday",
|
||||
device_class=SensorDeviceClass.ENUM,
|
||||
options=["none", "rain", "snow", "sleet", "storm"],
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: PRECIPITATION_TYPE.get(
|
||||
data.precip_analysis_type_yesterday
|
||||
),
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_minutes_local_day",
|
||||
translation_key="precip_minutes_local_day",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_minutes_local_day,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_minutes_local_yesterday",
|
||||
translation_key="precip_minutes_local_yesterday",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_minutes_local_yesterday,
|
||||
),
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="precip_minutes_local_yesterday_final",
|
||||
translation_key="precip_minutes_local_yesterday_final",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
suggested_display_precision=1,
|
||||
value_fn=lambda data: data.precip_minutes_local_yesterday_final,
|
||||
),
|
||||
# Lightning Sensors
|
||||
WeatherFlowCloudSensorEntityDescription(
|
||||
key="lightning_strike_count",
|
||||
|
@ -56,6 +56,34 @@
|
||||
"lightning_strike_last_epoch": {
|
||||
"name": "Lightning last strike"
|
||||
},
|
||||
"precip_accum_last_1hr": {
|
||||
"name": "Rain last hour"
|
||||
},
|
||||
|
||||
"precip_accum_local_day": {
|
||||
"name": "Precipitation today"
|
||||
},
|
||||
"precip_accum_local_day_final": {
|
||||
"name": "Nearcast precipitation today"
|
||||
},
|
||||
"precip_accum_local_yesterday": {
|
||||
"name": "Precipitation yesterday"
|
||||
},
|
||||
"precip_accum_local_yesterday_final": {
|
||||
"name": "Nearcast precipitation yesterday"
|
||||
},
|
||||
"precip_analysis_type_yesterday": {
|
||||
"name": "Precipitation type yesterday"
|
||||
},
|
||||
"precip_minutes_local_day": {
|
||||
"name": "Precipitation duration today"
|
||||
},
|
||||
"precip_minutes_local_yesterday": {
|
||||
"name": "Precipitation duration yesterday"
|
||||
},
|
||||
"precip_minutes_local_yesterday_final": {
|
||||
"name": "Nearcast precipitation duration yesterday"
|
||||
},
|
||||
"sea_level_pressure": {
|
||||
"name": "Pressure sea level"
|
||||
},
|
||||
|
@ -489,6 +489,466 @@
|
||||
'state': '2024-02-07T23:01:15+00:00',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_duration_yesterday-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_duration_yesterday',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Nearcast precipitation duration yesterday',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_minutes_local_yesterday_final',
|
||||
'unique_id': '24432_precip_minutes_local_yesterday_final',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_duration_yesterday-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Nearcast precipitation duration yesterday',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_duration_yesterday',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_today-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_today',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Nearcast precipitation today',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_accum_local_day_final',
|
||||
'unique_id': '24432_precip_accum_local_day_final',
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_today-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Nearcast precipitation today',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_today',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_yesterday-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_yesterday',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Nearcast precipitation yesterday',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_accum_local_yesterday_final',
|
||||
'unique_id': '24432_precip_accum_local_yesterday_final',
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_nearcast_precipitation_yesterday-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Nearcast precipitation yesterday',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_nearcast_precipitation_yesterday',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_duration_today-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_duration_today',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Precipitation duration today',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_minutes_local_day',
|
||||
'unique_id': '24432_precip_minutes_local_day',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_duration_today-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Precipitation duration today',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_duration_today',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_duration_yesterday-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_duration_yesterday',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Precipitation duration yesterday',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_minutes_local_yesterday',
|
||||
'unique_id': '24432_precip_minutes_local_yesterday',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_duration_yesterday-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Precipitation duration yesterday',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_duration_yesterday',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_today-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_today',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Precipitation today',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_accum_local_day',
|
||||
'unique_id': '24432_precip_accum_local_day',
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_today-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Precipitation today',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_today',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_type_yesterday-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'options': list([
|
||||
'none',
|
||||
'rain',
|
||||
'snow',
|
||||
'sleet',
|
||||
'storm',
|
||||
]),
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_type_yesterday',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Precipitation type yesterday',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_analysis_type_yesterday',
|
||||
'unique_id': '24432_precip_analysis_type_yesterday',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_type_yesterday-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'device_class': 'enum',
|
||||
'friendly_name': 'My Home Station Precipitation type yesterday',
|
||||
'options': list([
|
||||
'none',
|
||||
'rain',
|
||||
'snow',
|
||||
'sleet',
|
||||
'storm',
|
||||
]),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_type_yesterday',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'none',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_yesterday-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_yesterday',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Precipitation yesterday',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_accum_local_yesterday',
|
||||
'unique_id': '24432_precip_accum_local_yesterday',
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_precipitation_yesterday-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Precipitation yesterday',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_precipitation_yesterday',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_pressure_barometric-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@ -609,6 +1069,62 @@
|
||||
'state': '1006.2',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_rain_last_hour-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.my_home_station_rain_last_hour',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor': dict({
|
||||
'suggested_display_precision': 1,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Rain last hour',
|
||||
'platform': 'weatherflow_cloud',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'precip_accum_last_1hr',
|
||||
'unique_id': '24432_precip_accum_last_1hr',
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_rain_last_hour-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'attribution': 'Weather data delivered by WeatherFlow/Tempest API',
|
||||
'friendly_name': 'My Home Station Rain last hour',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfLength.MILLIMETERS: 'mm'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_home_station_rain_last_hour',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_all_entities[sensor.my_home_station_temperature-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
Loading…
x
Reference in New Issue
Block a user