Comments (3)
Sorry for the non-formatted code. Below the formatted code.
- alias: sensor2
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.stair2
action:
- service: automation.turn_off
entity_id: automation.sensor2
- service: automation.turn_on
entity_id: automation.sensorTimeout
- service: variable.set_variable
data:
variable: stair_state
value_template: '{{ 3 if (variable.state | int) == 1 else 2 }}'
- condition: template
value_template: '{{ (states.variable.stair_state.state | int) == 3 }}'
- service: script.turn_on
entity_id: script.stair_up
from hass-variables.
Does {{ 3 if (states.variable.stair_state.state | int) == 1 else 2 }}
work?
from hass-variables.
Yes, this line works.
from hass-variables.
Related Issues (20)
- How to remove form HA HOT 3
- Question: Template inside a variable HOT 4
- HA 117 : template value should be a string for dictionary value @ data['attributes_template'] HOT 34
- Problem using variable in trigger. HOT 1
- Native type templates seems to break attributes_template HOT 3
- massive errors in set_variables with attributes HOT 2
- Getting type mismatches on recent versions HOT 2
- variable, attributes_template does not work HOT 5
- SQL database growth exponentionaly HOT 6
- Issue with setting larger data
- 'version' key needed in the manifest file HOT 3
- hass-variables NOT working after 2021.6.0 update HOT 13
- Integration not found HOT 3
- Feature Request: Use entity_id instead of variable HOT 1
- Dosen't work after update HA to 2022.7.x HOT 5
- Unable to find service variable.set_variable HOT 2
- unique_id HOT 1
- Python 3.10 - wait() got an unexpected keyword argument 'loop' HOT 3
- Breaking change in latest HA: aionotify not compatible with python 3.11 HOT 1
- Version 3.4.0 of custom integration 'variable' prevents recorder from working and was blocked from loading 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 hass-variables.