Add apsystems power switch (#122447)
* bring back power switch
* fix pylint issues
* add SWITCH to platform list
* improve run_on and turn_off functions
* ruff formatting
* replace _state with _attr_is_on
* Update homeassistant/components/apsystems/switch.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* remove unused dependencies
* Update homeassistant/components/apsystems/switch.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use async functions from api
* convert Api IntEnum Status Information to bool
* add translation key
* implement async_update again
* replace finally with else
* better handling of bool value
* Update homeassistant/components/apsystems/switch.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/apsystems/switch.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* rename power switch to inverter switch
* add test_number and test_switch module
* remove test_number
* Add mock entry for get_device_power_status
* Add mock entry for get_device_power_status
* Update test snapshots
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>