This way _handle_event can contain things available
when entity has been added to home assistant,
and _apply event can remain internal and used on init.
* Switch what is used for device identifier
type_string can be changed if new device types are added based
on same driver.
* No need to slugify unique id
* Switch to dispatcher
* Adjust tests for dispatcher
* Store device in sensor
* Move state application into binary sensor entity class
* Move more specifics into per platform classes
* Should not apply event in init of sensor
* Switch to call_later
* Make apply_event public
* No point in slugifying debug logs
* Adjust error in off delay and event
* Make sure we match with masked id
* Switch tests to use hass objects instead of direct
* Make sure sensor update state
* Add some initial binary sensor tests
* Add initial binary sensor tests
* Add tests for pt2262
* Add test for off delay