ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
353 stars 50 forks source link

Add to the attributes the next switch change. #71

Open miki3421 opened 2 years ago

miki3421 commented 2 years ago

Is your feature request related to a problem? Please describe. At the moment this value is present on the HA log and I need to keep open the terminal to read the values.

Describe the solution you'd like Would be the best having this in an attribute to read directly from the an HA lovelace card.

Describe alternatives you've considered Value already present in the log.

Additional context this is an example: Time until switch.gas_miki_office turns on for Smart Miki Office (climate.smart_miki_office): 2063 sec

Time_next_change: 2036 sec.

And thank to the developer for this amazing integration. Really it works so well.

miki3421 commented 2 years ago

I've made this change on my own. Let me know if I can post here the updated version of the climate.py

bigbread59 commented 2 years ago

@miki3421 Great!! I am very interested in this feature!

miki3421 commented 2 years ago

Here you can find the climate.py file that is creating time_to_off and time_to_on as attributes. just overwrite the file that is in the directory /custom_components/smart_thermostat. I suggest anyway to make a copy of the original file in case of problems. climate.py.zip

bigbread59 commented 2 years ago

Here you can find the climate.py file that is creating time_to_off and time_to_on as attributes. just overwrite the file that is in the directory /custom_components/smart_thermostat. I suggest anyway to make a copy of the original file in case of problems. climate.py.zip

Thanks, i'll try

miki3421 commented 2 years ago

Here you can find the climate.py file that is creating time_to_off and time_to_on as attributes. just overwrite the file that is in the directory /custom_components/smart_thermostat. I suggest anyway to make a copy of the original file in case of problems. climate.py.zip

Thanks, i'll try

Let me know if is working or not.

bigbread59 commented 2 years ago

@miki3421 @ScratMan

It works well.

It would be better to include this feature in the official version.

dorinvlas commented 1 year ago

Guys can you provide some screenshots with this implementation? It would be very interesting to see the actual visuals. Thanks

miki3421 commented 1 year ago

Hi,

once you have these attributes you can do much more. Even some automation to check if everything is ok. Here. my visualization for example.

[image: image.png]

or graph them.

[image: image.png]

:)

Il giorno mar 8 nov 2022 alle ore 06:21 rUpere @.***> ha scritto:

Guys can you provide some screenshots with this implementation? It would be very interesting to see the actual visuals. Thanks

— Reply to this email directly, view it on GitHub https://github.com/ScratMan/HASmartThermostat/issues/71#issuecomment-1306652705, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFA25WPYYWDOKPJSA2BMCLWHHPOHANCNFSM5MYJICBA . You are receiving this because you were mentioned.Message ID: @.***>

dorinvlas commented 1 year ago

I don't see the images... only some tags like [image: image.png]. Thanks

miki3421 commented 1 year ago

Screenshot 2022-11-08 at 08 55 29

image

dorinvlas commented 1 year ago

WOW niceee! Thanks.

Why you did not convert the seconds in the

miki3421 commented 1 year ago

You can do it. I don't need actually, once is set properly it works very well.

dorinvlas commented 1 year ago

Super cool! Thanks again!

On Tue, 8 Nov 2022 at 13:01, miki3421 @.***> wrote:

You can do it. I don't need actually, once is set properly it works very well.

— Reply to this email directly, view it on GitHub https://github.com/ScratMan/HASmartThermostat/issues/71#issuecomment-1307022983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFW73O5IGOKRTH2U4LPJSTWHIXJBANCNFSM5MYJICBA . You are receiving this because you commented.Message ID: @.***>

--

*I wish you a good day._____Best regards, Dorin @. @.>*

ScratMan commented 1 year ago

Hello, I'm sorry I didn't work on the thermostat for a while, arrival of baby #2 drastically reduced my free time. I hope to be able to make a new build before end of the year (as Christmas gift)

There is a need for a rework of the thermostat attributes because as is, every change in one of the attributes will trigger storing a new state in the database for the thermostat with all the attributes, even those that didn't change. It increases the size of the database and reduces the performance of HA. So I need to change the code to send the PID and debug attributes in some optional sensors that should be enabled or disabled by configuration script.

T81 commented 1 year ago

Screenshot 2022-11-08 at 08 55 29

image

Which card is the first one? It looks very informative

mannebk79 commented 1 year ago

There is a need for a rework of the thermostat attributes because as is, every change in one of the attributes will trigger storing a new state in the database for the thermostat with all the attributes, even those that didn't change. It increases the size of the database and reduces the performance of HA.

I already see that after one week with two smart thermostats... it really slows the system down, and i do not use the stock HA database but MariaDB for the reason the stock db is so slow if you start to pump in data like an own weather station and other trigger intensive stuff.