1 """Demo platform that offers fake air quality data."""
3 from __future__
import annotations
13 config_entry: ConfigEntry,
14 async_add_entities: AddEntitiesCallback,
16 """Set up the Demo config entry."""
23 """Representation of Air Quality data."""
25 _attr_attribution =
"Powered by Home Assistant"
26 _attr_should_poll =
False
28 def __init__(self, name: str, pm_2_5: int, pm_10: int, n2o: int |
None) ->
None:
29 """Initialize the Demo Air Quality."""
37 """Return the particulate matter 2.5 level."""
42 """Return the particulate matter 10 level."""
47 """Return the nitrogen oxide (N2O) level."""
int|None nitrogen_oxide(self)
None __init__(self, str name, int pm_2_5, int pm_10, int|None n2o)
int particulate_matter_10(self)
int particulate_matter_2_5(self)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)