Comments (10)
I have exact the same problem. I dont think this is normal :/
from hass-template-climate.
You can pass a variable to a script when you call it in Home Assistant.
let's consider we have the following script:
# Example script
script:
my_script:
sequence:
- service: notify.mobile_app
data:
message: "Received value: {{ value }}"
Now let's call the above example script with an automation and pass a value in a variable:
automation:
- alias: Call Script with Variable
trigger:
platform: state
entity_id: binary_sensor.motion_sensor
to: 'on'
action:
- service: script.turn_on
entity_id: script.my_script
data_template:
value: "Hello, World!"
So in the case of the set_hvac_mode you'll do something like this:
set_hvac_mode:
- service: script.turn_on
entity_id: script.my_script
data_template:
value: "{{ hvac_mode }}"
I hope this helps.
from hass-template-climate.
@harisma-git I have the same issue, have you been able to find a way to do it ?
from hass-template-climate.
The way you can do this is by using the variable that gets exposed to the action:
set_hvac_mode:
- service: esphome.bedroom
data:
hvac_mode: "{{ hvac_mode }}"
Actions are essentially scripts, and they expose variables for you to use.
Hope this helps!
from hass-template-climate.
The way you can do this is by using the variable that gets exposed to the action:
set_hvac_mode: - service: esphome.bedroom data: hvac_mode: "{{ hvac_mode }}"Actions are essentially scripts, and they expose variables for you to use.
Hope this helps!
But how can i achieve this when i calling a script to set the hvac mode? I use this integration to send commands to a knx bus, without hvac_mode_template i call a script and the commands to knx are working fine but i dont have synchronization with wall mounts controllers of the aircondition. When i use hvac_mode_template i have the synchronization but i can not command them (run the scripts). Any idea would be extremely helpfully.
from hass-template-climate.
Unfortunately, no. I have it without synchronization :/
from hass-template-climate.
Unfortunately, no. I have it without synchronization :/
Thanks @harisma-git.
@jcwillox any ideas ?
from hass-template-climate.
@Tonguc-Endem I dont think this is SUPPOSED to be how this works, but it does seem to work!
from hass-template-climate.
@harisma-git I have the same issue, have you been able to find a way to do it ?
Same issue for me
from hass-template-climate.
Related Issues (20)
- Set_temperature error HOT 1
- Moes UFO-R11 Zigbee IR blaster setup HOT 2
- Template loop detected while rendering hvac_action_template
- Unable to see/set target temperature HOT 1
- [FR]: target_humidity_template and set_humidity
- target_temperature not visible HOT 2
- [FR]: set_hvac_action
- Error "running script requires passing in a context" | Fancoil Modbus Integration HOT 2
- [FR]: initial_hvac_mode HOT 1
- [FR]: Make possible to reload entities by reloading yaml
- How to change the target temperature when controlling the AC with an IR control
- Can't pass changed temperature to set_temperature script HOT 3
- [ISSUE] unique_id not working, name already use
- Target Temperature is never displayed and can't be set, also fan modes are not displayed HOT 13
- Entity state is always "Off" even though all controls work as expected HOT 7
- Cant set Target temp low and Target temp high with thermostat entity when in heat/cool mode
- set_temperature action does not work HOT 3
- [FR]: Add the ability to quick reload the component
- [FR]: Add the self referencing this variable to the component
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-template-climate.