Adapt python script to also show automations

No, you’re right. I shortened it because the ‘automation.’+ crap was unnecessary.

Hassio is working great for me. What version you on?

0.73.1 and waiting the for the update to become available… see CustomUI - discussion thread - #204 by Mariusthvdb and Tradfri. Aiocoap. What is this error about tinydtls.py?

yah those are weird errors. what code have you added recently? Do you use tortoiseHG or something like that to backup changes and revert back if you need?

No, nothing special, its been this ever since Hue was changed to asyncio:

2018-07-17 17:45:42 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-07-17 17:45:42 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 4 seconds
2018-07-17 17:45:43 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 17:45:49 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 17:45:52 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 17:45:56 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 17:45:59 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-07-17 17:46:02 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-07-17 17:46:02 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 8 seconds
2018-07-17 17:46:02 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

ive taken out all customizations, all automations and all Custom components that could interfere…

up to this now:

2018-07-17 17:51:27 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-07-17 17:51:27 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 256 seconds

please let me get back to this quickly.
with the amazing templating help of @pnbruckner we’ve found a way to adapt the automation for the triggered automations to be triggers for other actions, see Why doesnt this automation trigger automatically, one of them being the script we made here. Which is cool and results in this now (top icon):

26

to be more precise and be able to show the same automation being triggered several times I needed to show the seconds too, so changed:

state = hass.states.get(entity_id)

# Make a time string in 24 hour format
#time_string = datetime.datetime.now().strftime('%I:%M')
dt = datetime.datetime.now() #state.attributes.get('last_triggered') #
time = "%02d:%02d" % (dt.hour, dt.minute)

into:

state = hass.states.get(entity_id)

# Make a time string in 24 hour format
#time_string = datetime.datetime.now().strftime('%I:%M')
dt = datetime.datetime.now() #state.attributes.get('last_triggered') #
time = "%02d:%02d:%02d" % (dt.hour, dt.minute, dt.second)

47

cool, thanks to you both!

2 Likes