Git Product home page Git Product logo

versatile_thermostat's People

Contributors

adi90x avatar bergoglio avatar diplix avatar echopage avatar epiclurcher avatar fredericseiler avatar ikoz avatar jdeksup avatar jmcollin78 avatar mbbush avatar misa1515 avatar muchasuerte avatar pdcastro avatar vassilis-papanikolaou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

versatile_thermostat's Issues

When changing the target temperature, preset, motion, presence or window states there is a delay before heater activation or deactivation

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.

2 Stage Heating

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

Add a service to force the presence or non presence

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.

Add a configurable minimal delay of activation

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.

Add a window open detection based on internal temperature change

[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]

Use Device and multiple entities to conform with HA philosophy

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:

  • one for the climate entity,
  • one binary entity for the security | motion | power | window | presence state,
  • one sensor for the instantaneous power and energy,

Rename None preset to Manual

Because None (Aucun in French) preset is confusing with the Off hvac-mode, and because Preset Off means manual temperature tuning.

Reset security mode when preset or hvac_mode change

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.

Fan Cycle

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.

Target Temp at Specified Time

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.

Some switch are not visible in the list of radiators

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

Failure to initialize

Version of the custom_component

2.0.0beta7

Configuration

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'

Describe the bug

Setup one thermostat over a climate device. It tries to initialize, but fails part of the way through with the above error.

Debug log


Add your logs here.

Cannot remove entity_id in configuration

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

A thermostat stays with security_default_on_percent when the preset change during security mode

There is a bug in the following conditions:

  1. the thermostat switch to security preset because the temperature sensor didn't send temperature on time,
  2. the preset change (due to Scheduler for example),
  3. the temperature sensor re-send temperature

Expected behaviour:

  • at 1., the preset is set to security, the on_percent is set to security_default_on_percent, the security_state is True,
  • at 2., the preset should stay in security (the new preset should me memorised at the end of security mode),
  • at 3., the preset in set with the preset given in 2., the on_percent is restored with calculated value, the security_state is False

Constated behaviour:

  • at 1. -> ok,
  • at 2. -> the preset change (should keep security)
  • at 3. -> the on_percent stays with security_default_on_percent, the security_state stays in True.

Change preset to "security" when the Thermostat goes in security mode

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.

Add unit testing

Because there is no good development without unit testing, we need to implement unit testing.

Échec d'appel du service climate/set_preset_mode. 'NoneType' object has no attribute 'lower'

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

When shutting of a thermostat after it has been in security mode, the thermostat can start up alone

Security mode which have been introduced in release 1.1.0.beta1 has an unwanted side effect.

Conditions or reproduction:

  • Set a thermostat in security mode with muting temperature sensor,
    -> the thermostat is set to hvac-mode = off and security_state= True
  • send a temperature value (unmuting the sensor),
    -> the thermostat turns to On (but security mode stays to True and here is the bug)
  • Turn off the thermostast manually,
  • send a temperature value,
    -> the thermostat turns to On and this is unwanted because we have shutdown it manually.

Hide preset that are not configured

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.

Notify (send event messages) when something important happens

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.

Add the device power and device energy into attributes

.. 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.

Error at initialisation

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

Enhancing Security mode

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,

In certain case, temperature event are registred with an offset of one hour

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.

Support Fahrenheit

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.

Set preset internal

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

self._last_temperature_mesure = (
self._last_ext_temperature_mesure
) = datetime.now()

Not really sure why we want to update the last_available_temp when we set a preset.
But it means that as soon as we switch to SECURITY PRESET we also set last_available_temp to 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

Add a temperature configuration for present / not present for each preset

Cf. 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/91

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.