Skip to content

add parameter refresh to mqtt activity for dynamic sleep time override#13

Merged
lanrat merged 3 commits intolanrat:mainfrom
elratt0r:sleep_time_via_mqtt
Dec 10, 2022
Merged

add parameter refresh to mqtt activity for dynamic sleep time override#13
lanrat merged 3 commits intolanrat:mainfrom
elratt0r:sleep_time_via_mqtt

Conversation

@elratt0r
Copy link
Copy Markdown
Contributor

@elratt0r elratt0r commented Dec 2, 2022

Useful for having a certain activity displayed for a shorter time range or having more frequent updates.
By using the activity/run topic, it only overwrites the sleep duration once, so no need to keep track of setting
the interval up and down manually.

Usage example:
I have an automation for commute times that runs every 5 minutes in the morning between 6 and 9.
After the sensor update I send mqtt.publish({"action": "hass", "refresh": "300"}) to have a shorter update interval
for the next run so the information on the display is more up-to-date.

@lanrat
Copy link
Copy Markdown
Owner

lanrat commented Dec 10, 2022

This is a great idea! I'll even use it myself. Thanks!

@lanrat lanrat merged commit 1a481ac into lanrat:main Dec 10, 2022
@lanrat
Copy link
Copy Markdown
Owner

lanrat commented Dec 10, 2022

@elratt0r would you mind providing an example of how to use this to dashboard.md or another doc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants