1 """The output limit which can be set in the APsystems local API integration."""
3 from __future__
import annotations
11 from .
import ApSystemsConfigEntry, ApSystemsData
12 from .entity
import ApSystemsEntity
17 config_entry: ApSystemsConfigEntry,
18 add_entities: AddEntitiesCallback,
19 discovery_info: DiscoveryInfoType |
None =
None,
21 """Set up the sensor platform."""
27 """Base sensor to be used with description."""
30 _attr_device_class = NumberDeviceClass.POWER
31 _attr_mode = NumberMode.BOX
32 _attr_native_unit_of_measurement = UnitOfPower.WATT
33 _attr_translation_key =
"max_output"
39 """Initialize the sensor."""
41 self.
_api_api = data.coordinator.api
47 """Set the state with the value fetched from the inverter."""
51 """Set the desired output power."""
None __init__(self, ApSystemsData data)
None async_set_native_value(self, float value)
None async_setup_entry(HomeAssistant hass, ApSystemsConfigEntry config_entry, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
None add_entities(AsusWrtRouter router, AddEntitiesCallback async_add_entities, set[str] tracked)