Support for sensor values

Initial support for sensot values. For this the state mechanism needed refactoring.
I don't know if temperature and humidity sensor calculation works since I don't have those.
Also lux is calculated as integer value (not double)