Using the script from https://github.com/watchforstock/evohome-client, I'd like to log the data into a file that's easily importable into Excel for manipulation, along with logging the timestamp of each temperature line.
When I run:
Code:
for device in client.temperatures():
print device
It shows:
Code:
{'temp': 53.0, 'setpoint': '', 'thermostat': 'DOMESTIC_HOT_WATER', ......
{'temp': 21.5, 'setpoint': 21.0, 'thermostat': 'EMEA_ZONE', .....
How would I add a timestamp to the beginning of each line so that it looks like:
Code:
{'timestamp': 19/10/2015 20:27, 'temp': 53.0, 'setpoint': '', 'thermostat': 'DOMESTIC_HOT_WATER', ......
{'timestamp': 19/10/2015 20:27, 'temp': 21.5, 'setpoint': 21.0, 'thermostat': 'EMEA_ZONE', .....
I'm no Python programmer, so trying to follow the code (e.g. temperatures() )when it's split up into many different segments from different files is proving difficult, let alone figuring out how to add a timestamp into there too.
Thanks.