Comments (9)
For others wishing to implement this "hack" you would add something like the following to your script / automation. A script has an "off" or "on" state. "on" when it is actively running
condition: template
value_template: "{{not is_state('script.your_script_name','on') }}"
Along with a delay at the end after the service is executed.
delay: '00:0:15'
from dasshio.
I think that since #82 the timeout
config is no longer being used
from dasshio.
This is occurring with 0.3.6 dashio and home assistant 0.93.2 but was working in a previous version of both dashio and home assistant. The only way I was able to remove the impact of this issue was by modifying my script to only run when it is not already running. This seems to have solved the repeated triggers from dashio. Is nobody else seeing this issue?
from dasshio.
Yup - theres a few of us that reported it in issue #86 (admitedly the title isnt as explicit as yours :)
Mind sharing the script? My buttons were set up originally to toggle a light. However I have had to modify mine to just switch the light off rather than toggle (however means I have turn the light on manually :)
What would the script look like?
from dasshio.
Since I am using this button as a weather report I added a condition to see if the speaker is still playing and then added a delay at the end since each button press last for 20 seconds.
`weather_report:
alias: Weather Report
sequence:
- condition: template
value_template: "{{not is_state('media_player.basement_speaker','playing') }}" - service: media_player.volume_set
data:
entity_id: media_player.basement_speaker
volume_level: '.30' - service: tts.google_say
entity_id: media_player.basement_speaker
data_template:
message: 'It is {{ now().strftime( "%-I" )}} {{ "%0.02d" | format(now().strftime("%-M") | int) }} {{ now().strftime( "%p" )}}.
The weather is currently {{states.sensor.dark_sky_summary.state}} and feels like {{states.sensor.dark_sky_apparent_temperature.state|round}} degrees.'
cache: false - delay: '00:0:15'`
from dasshio.
In your case you could just prevent the script from running again with a similar condition and adding the delay.
from dasshio.
Thank you! I have taken the weather idea and implemented that. Will work on changing my switches to follow the same process over next few days. Much appreciated!
from dasshio.
Glad it works. I know it is a hack but at least it gets things running again. Prior to this change my weather report would keep restarting for the first 20 seconds and then finish so didn't make it very helpful. :)
from dasshio.
For others wishing to implement this "hack" you would add something like the following to your script / automation. A script has an "off" or "on" state. "on" when it is actively running
condition: template
value_template: "{{not is_state('script.your_script_name','on') }}"Along with a delay at the end after the service is executed.
delay: '00:0:15'
Sorry fpr the noobish question, but could you give me an Example of a Script I could use for toggling a light?
from dasshio.
Related Issues (20)
- README.md grammar error
- Errors Log, config HOT 4
- help to understand error in logs HOT 2
- Manual installation HOT 1
- 400 Bad Request from Homeassistant API HOT 1
- Some scripts work - others don't - here's how to fix it HOT 2
- support for 'dash wand'? HOT 1
- How to get dasshio to connect to HA IP address HOT 5
- Where to put the config file ? HOT 2
- Problem with config HOT 7
- Service started but not responding to Dash buttons HOT 5
- README.md regarding Quick Setup
- ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /addons/03d23610_dasshio/changelog
- Expections since ~ beginning of May
- Dash button stopped working HOT 16
- Amazon Dash button Not working updating Home Assistant 0.102.2 HOT 5
- Format for button connection to wifi HOT 7
- Prevent New Dash Button from Being Bricked HOT 1
- Nmap Device Tracker conflict HOT 1
- Older Dash Buttons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dasshio.