jmcollin78 / versatile_thermostat Goto Github PK
View Code? Open in Web Editor NEWA full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
License: MIT License
A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
License: MIT License
In current implementation the calculation of the percentage of on vs off period is done immediatly but taken into account at the end of the current period.
This generate a delay between the change and the heater state which difficult to understand.
It should be possible to restart a new cycle if the target temperature change (and only in that case), so the heater state will reflect the new calculation as soon as possible.
If would be great if presence sensor could check also the 'home' state and not only the 'on' state.
Then we could use person.xxx sensor directly as presence detector.
Is your feature request related to a problem? Please describe.
I have a mini-split system that cannot keep the set temperature when heating if the outside temperature gets too low. I have a pellet stove that is used as a backup heat source and as auxiliary heat.
Describe the solution you'd like
I would like to be able to pick a second switch (in my case a Shelly 1 Plus) which controls an auxiliary heat source that is enabled/disabled when the primary heat source cannot keep the target temperature. The trigger would be configurable with a combination of time and degrees from target temp (ie. if the current temperature is 2 degrees less than the set temp for 10 minutes). The second heat source should have min/max on and off time configurable to prevent short cycling.
Describe alternatives you've considered
Currently with my SmartSi thermostats I have a separate NodeRed automation to handle this.
Additional context
None
It could be useful to have a service that force the presence or not. This could be called by integration like Alarmo (Netatmo) which is able to call a service when activated or deactivated.
Se the discussion here: https://forum.hacf.fr/t/nouveau-thermostat-type-proportionnel-avec-gestion-des-presets-portes-et-fenetres-detection-de-mouvement-gestion-de-presence-et-surconsommation/19160/80
Note: if a presence sensor is configured, it could conflict with this service. In that case, the last presence status coming from presence sensor or the service call will be used until the next presence sensor event or service call.
To avoid over solicitation of certain type of configuration (central gaz heater for example), we should not activate / deactivate the heater (a pump here) too often.
Then we should have a configurable min activation delay under which the heater (the pump) should not being activated.
.. and lookup to see if a service is possible to change min_temp, max_temp
Hello,
Une feature request :)
Ajouter un champ avec le délai entre de 2 changements de température. Le thermostat passe en arrêt / défectueux si pas de changement de valeur de température au bout de x min
[quote="Gael1980, post:211, topic:19160, full:true"]
Bonjour à tous,
Bravo pour ce thermostat.
Une idée, pour ceux qui n’ont pas de capteur d’ouverture fenêtre/porte, est-il possible de mettre en option qui vérifie les variations de température.
Ex.: si la température baisse de 1° en 15 min alors que le chauffage est en route, alors le système suppose qu’une porte/fenêtre est ouverte.
Si aucune action de l’utilisateur n’est faite au bout d’un certain temps, le régulateur se remet en route.
Je ne sais pas si je suis clair.
Bonne journée,
Gaël
```[/quote]
Rather than exposing only one entity with multiple internal attributes, it should be better to conform to the HA philosophy and have one device per thermostat and many entities:
To facilitate the configuration some commons configuration examples should be given in documentation.
...and use something more standard in HA.
Translation for preset_mode Power and Security are not taken into account.
Because None (Aucun in French) preset is confusing with the Off hvac-mode, and because Preset Off means manual temperature tuning.
It would be much better is the "reload" can be automatic after a change in the integration's configuration
I create a thermostat over a climate (Tuya) and I've got this error:
'VersatileThermostat' object has no attribute '_attr_fan_modes'
This error prevent the thermostat to be available.
As discussed here a PID mode should be interesting to study: https://forum.hacf.fr/t/smart-thermostat-le-chauffage-controle-par-pid/7633/2
When the preset or hvac_mode change, we should reset the security check,
so that when a preset change after a long stable period, the radiator will not switch to Security mode instantly but after the security duration.
Is your feature request related to a problem? Please describe.
I would like to control my SmartSi thermostats with the component. My current thermostats have a Fan Cycle which allows you to have the fan run X minutes per hour, whether or not heating/cooling is needed.
Describe the solution you'd like
Versatile Thermostat should be able to be configured to run the fan for X minutes per hour. Picking a runtime per hour in 5 minute increments from 0 - 60 would cover my use case.
Describe alternatives you've considered
I could run a separate automation, but that seems like it would conflict with this thermostat.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
It is suggested to use an external scheduling component to schedule temperature changes for the thermostat. That is great, but it would be ideal to be able to set a schedule (ie. 7am 69f, 9pm 66f) and have the thermostat choose when enable heating/cooling such that it attempts to reach the target temperature at the specified time.
Describe the solution you'd like
I would like to be able to configure a schedule (ie. 7am 69f, 9pm 66f), have the thermostat account for internal temperature, external temperature, and historical heating/cooling metrics, and use this information to enable heating/cooling earlier than the scheduled time. The goal is that the internal temperature reaches that set point at the scheduled time (ie. 6am for a 7am 69f schedule), rather than the set point being changed at the target time and then the thermostat needs to catch up. This is especially important for systems which take a while to reach the target temperature (ie. heat pumps).
Describe alternatives you've considered
An external scheduling component may work, but it will need a much of the logic of a thermostat to be able to accomplish this.
Additional context
Add any other context or screenshots about the feature request here.
A switch created by this template is not visible in the list of switch
- platform: template
switches:
pilote_sdb_rdc:
friendly_name: "Pilote chauffage SDB RDC"
value_template: "{{ is_state_attr('switch_seche_serviettes_sdb_rdc', 'sensor_state', 'on') }}"
turn_on:
service: select.select_option
data:
option: comfort
target:
entity_id: select.seche_serviettes_sdb_rdc_cable_outlet_mode
turn_off:
service: select.select_option
data:
option: comfort-2
target:
entity_id: select.seche_serviettes_sdb_rdc_cable_outlet_mode
Voir le fichier README-fr.md
Cf. title.
And remove Linear and Atan function which are replaced by TPI mode.
... and skip the feature if checkbox is not checked for that feature.
2.0.0beta7
Traceback (most recent call last):
File "/config/custom_components/versatile_thermostat/climate.py", line 1073, in _async_temperature_changed
self.recalculate()
File "/config/custom_components/versatile_thermostat/climate.py", line 1766, in recalculate
self.update_custom_attributes()
File "/config/custom_components/versatile_thermostat/climate.py", line 1834, in update_custom_attributes
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 599, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 314, in state_attributes
self.target_temperature_high,
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 399, in target_temperature_high
return self._attr_target_temperature_high
AttributeError: 'VersatileThermostat' object has no attribute '_attr_target_temperature_high'
Setup one thermostat over a climate device. It tries to initialize, but fails part of the way through with the above error.
Add your logs here.
After configuring a thermostat, it is impossible to remove an entity_id value.
When setting the entity_id attribute to None, it is not taken into account and then not removed from Config
Limits the configurable presets to Eco, Confort, Boost et Power (+ Activity for the movement detection management)
Cf title.
There is a bug in the following conditions:
Expected behaviour:
Constated behaviour:
Security mode is activated when the temperature have not been received from a long time.
This shutdown the Thermostat but from a user point of view it is very difficult to see why the thermostat is off.
For this, add a hidden preset (like power) which will turns to 'Security' when the thermostat goes off for security reason.
Because there is no good development without unit testing, we need to implement unit testing.
Bonjour,
Dsl c'est en francais.
J'ai un souci sur des thermostat j'ai au bout de quelque heure ce message la
Échec d'appel du service climate/set_preset_mode. 'NoneType' object has no attribute 'lower'
Cela apparait que sur des thermostat en zwave eurotronic via zwave-js-ui et mqtt
J’utilise cette carte en plus de simple-thermostat.
j'ai essayé différent réglages dans l'onglet security mais sans succès
Actuellement j'ai essayer avec pour le même résultat :
minimal_activation_delay_sec : 600
security_delay_min : 3600
security_min_on_percent : 1
security_default_on_percent : 0.3
Merci pour l'aide
A climatisation or a reversible climatisation should be usable with this thermostat. What we want is that every existing climate entity can be controled by a VersatileThermostat
Cf. title
Be aware that a temperature is set if present or not.
Security mode which have been introduced in release 1.1.0.beta1 has an unwanted side effect.
Conditions or reproduction:
It should be useful to have a service to change the security parameters.
Because this is 2 separate features, the heater power should be configurable even if power management is not selected.
The Power preset is visible event if no Power management is configured. Because it is dedicated to this function, it should be hidden in that case.
When the heater goes to 'Power' or 'Security' mode/preset, a notification should be send,
so that it would be possible to alert or take any decision.
When one of the temperature sensor delay if above the threshold security_delay_min, a notification should be send also.
In a stable situation, the temperature is stable (!!) and some thermometer doesn't send the temperature. So the heater goes in security mode in that case.
It's not worth to set into security mode a heater which not heating so much. If the heating percent is less that 0.75 don't set it to security mode even if temperature is not received for a long time
.. and see if it possible to expose a _power attribute which is the radiator_power * on_percent.
Don't know if it is a good value.
Maybe a most global energy value which the sum (radiator_power * on_percent * cycle) is most useful. Or the both ?
But this don't work if the power of radiator is not known or if it is changing over time. This will be an issue for hvac for which power is not a constant.
Bonjour,
Ca fait 2 beta, dont la 2.0.0.beta6 ou je reçois ce message:
Logger: custom_components.versatile_thermostat.climate
Source: custom_components/versatile_thermostat/climate.py:1127
Integration: Versatile Thermostat configuration (documentation, issues)
First occurred: 15:39:05 (1 occurrences)
Last logged: 15:39:05
Unrecognized hvac mode: None
Hello,
Using latest version available, it seems that security mode does not start as expected.
I.e : temperature is not update since more than 2h ( setting I put) and security mode still didn't start, however outdoor temperature still update so maybe the security mode does not trigger due to that.
Climate entity below :
hvac_modes:
- heat
- 'off'
min_temp: 7
max_temp: 30
preset_modes:
- none
- eco
- comfort
- boost
current_temperature: 9.1
temperature: 8.5
hvac_action: idle
preset_mode: none
hvac_mode: heat
type: thermostat_over_switch
eco_temp: 14
boost_temp: 18
comfort_temp: 16
eco_away_temp: null
boost_away_temp: null
comfort_away_temp: null
power_temp: 7
ext_current_temperature: 1.3
current_power: 37
current_power_max: 6000
saved_preset_mode: none
saved_target_temp: 10
saved_hvac_mode: null
window_state: 'off'
motion_state: null
overpowering_state: false
presence_state: null
security_delay_min: 120
last_temperature_datetime: '2023-02-07T17:22:05.283082'
last_ext_temperature_datetime: '2023-02-07T21:49:05.812406'
security_state: false
minimal_activation_delay_sec: 60
last_update_datetime: '2023-02-07T21:49:05.820742'
underlying_switch: switch.chauffage_sdb
on_percent: 0
on_time_sec: 0
off_time_sec: 600
cycle_min: 10
function: tpi
tpi_coef_int: 0.6
tpi_coef_ext: 0.01
friendly_name: Test Sdb Thermostat
supported_features: 17
Don't hesitate if you need more info !
Et en tout cas Bravo pour cette excellente implementation !
Bonne soirée,
Remonté par Frankb:
2023-02-19 19:19:27.004 DEBUG (MainThread) [custom_components.versatile_thermostat.climate] VersatileThermostat-Thermostat Frank - Temperature changed. Event.new_state is <state sensor.temperature_f_temperature=19.34; state_class=measurement, battery=100, humidity=51.43, linkquality=255, power_outage_count=37907, pressure=997, temperature=19.34, voltage=3005, unit_of_measurement=°C, device_class=temperature, friendly_name=Température F temperature @ 2023-02-19T19:19:26.894533+01:00>
Une mise à jour de température avec une valeur=19.34
Juste après je vois ça:
'last_temperature_datetime': '2023-02-19T18:19:26.894533+01:00'au lieu de 2023-02-19T19:19:26.894533+01:00
et là c’est le drame, on a reperdu 1 heure.
Pareil sur external temperature event, on perd 1 heure quand on l'enregistre.
cf. title
.. so that it will be possible to immediatly see when a thermostat is i security mode or in power mode.
Is your feature request related to a problem? Please describe.
On the configuration page the temperature ranges are in celsius even though my Home Assistant is in Fahrenheit.
Describe the solution you'd like
Automatically use the correct unit as defined in Home Assistant
Describe alternatives you've considered
Learning celsius, but it will take a while before it is second hand :P
Additional context
Add any other context or screenshots about the feature request here.
It would be great to have a select box or a text completion when configuring the entities used by the thermstat.
Hello again,
Testing and playing with the security mode, it seems that _async_set_preset_mode_internal
is setting last_temp and last_external_temp to now
versatile_thermostat/custom_components/versatile_thermostat/climate.py
Lines 1051 to 1053 in 9fe307b
now
so when we start the next cycle check_security
will always return true as we compare this fake now
to now
and we exit from the SECURITY preset.
Regards,
Adrien
In 1.0.0, when presence is configured with a person.xxxx sensor, the presence doesn't switch to 'Absent' if the person.xxxx sensor state is 'Carrefour'.
La détection de présence se fait via le capteur de présence (ajouté en beta5) qui est configuré sur la dernière page. Même si elle est configurable par thermostat elle a plutot vocation a être global à la maison. Son fonctionnement serait le suivant: sur changement de preset ou changement du capteur, on programme la température en fonction de l’état du capteur de présence (mais on ne change pas de preset à la différence du capteur de mouvement).
Ca reste à priori simple à configurer et suffisamment souple pour pas mal d’usage et éviter trop de Scheduler.
Note : a ne pas confondre avec la détection de mouvement qui permet de changer de preset automatiquement et qui à vocation à être au niveau de la pièce.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.