Comments (2)
Your problem is that when you're calling your services, you're using values from the template-cliame entity. However, at that point the climate entity is not holding the new values you've selected from the card interface. So you're just passing the unchanged value before you change it.
What you need to do is to use the specific variables provided by the template for the appropriate action you want to do.
here is a suggestion:
set_temperature:
- service: modbus.write_register
data:
hub: fancoil_hub
slave: 2
address: 231
value: "{{ temperature | int * 10}}"
set_hvac_mode:
- service: modbus.write_register
data:
hub: fancoil_hub
slave: 2
address: 233
value: |-
{%- if hvac_mode == 'heat' -%}
3
{%- else -%}
5
{%- endif -%}
set_fan_mode:
- service: modbus.write_register
data:
hub: fancoil_hub
slave: 2
address: 201
value: >
{% if fan_mode == 'auto') %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_and(65528) }}
{% elif fan_mode == 'low') %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_and(65530) | bitwise_or(2) }}
{% elif fan_mode == 'medium') %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_and(65529) | bitwise_or(1) }}
{% else %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_and(65531) | bitwise_or(3) }}
{% endif %}
set_swing_mode:
- service: modbus.write_register
data:
hub: fancoil_hub
slave: 2
address: 201
value: >
{% if swing_mode == 'on') %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_or(128) }}
{% else %}
{{ states('sensor.fc_soggiorno_prg') | int | bitwise_and(65407) }}
{% endif %}
from hass-template-climate.
Related Issues (20)
- Set_temperature error HOT 1
- Moes UFO-R11 Zigbee IR blaster setup HOT 2
- hvac_mode_template HOT 10
- 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
- [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.