I recently purchased a Xiaomi Gateway and am trying to set up a script to make the device flash as a alert – unfortunately it seems that the “flash” attribute of light
components don’t appear to work with the GW’s basic LED light.
Instead, to overcome this, I have a script that turns the the light
on and off with a delay
between each cycle. This delay
is pointing to a shared YAML file with the line milliseconds: 150
that is pulled via an !include
line.
I thought it would be easier, nicer and more configurable to use a template to pull this value off of an input_slider
element but I’m struggling to get the milliseconds value to pull through.
The issue seems to stem with the ability to template the delay
service – HASS has no trouble with the following:
delay: "00:00:{{ states.input_slider.some_seconds.state|int }}"
but fails when the delay is broken down into pieces:
delay:
milliseconds: "{{ states.input_slider.some_milliseconds.state|int }}"
It seems like the easiest option would be to add milliseconds to the first style of delay, but this only appears to support the hh:mm:ss
format, opposed to hh:mm:ss.sss
.
Any ideas?