Well. Thank you but ...there is some problem.
If I set "Energy_price_high" to "yes".
If the switch for "Heat" is set "On".
The "Energy_price_high" function is to switch the "Heat" "Off" (between 07:00 - 09:00 and 17:00 - 19:00) and "Heat" back to "On" other times.
If the switch for "Heat" is set "Off".
The "Energy_price_high" function is to switch the "Heat" "Off" (between 07:00 - 09:00 and 17:00 - 19:00) and "Heat" back to "Off" other times.
The the week patton of "Energy_price_hig" can be different on Monday, Tuesday, Onsdag, Tursday, Friday, Saturday, Sunday.
There is a need of a table to assist the "Energy_price_high".
I got a App Elen by www.webbium.se that specify the price of electric power. So the next step is to us indata from them and put a target when to switch on or off.