refactored Event logic into its own class
This will make for cleaner code and also make it easier to track when the value changed.
refactored binary sensor logic
Now it prefers the event value first, and it also will use the previous commit's capability to return a timestamp when the event value is used.
TimeStamp is initially null