* Fixed caching problem where old messages were sent out if long debounce values is used for sensor.
* Fixed caching problem where old messages were sent out if long debounce values is used for sensor
* State cache updated during debounce IF cache is enabled in configuration.
* Fixed code styles
* Implemented test case for testing State cache is updated correctly during debouncing
* If-statement was obsolete as cache can be update right away.
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>