2024.9.2: Refactoring for latest HA
Major refactoring as I has just realised my dev version of HA is about a year out of date and this will not work in the wild otherwise.
Removed async_setup_platform from sensors as it is redundant.
Simplified event descriptions to include just source and reference so it can be used to fetch data from other entities.