Added types to all arguments and return values to all functions
Defined class members and its types outside the constructor
Improved logic at binary sensor
* Small changes as requested in PR 58768
* Fix ValueError message formatting
* Use f-string
* Remove None as return type of _get_appliance_by_device_id
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>