I wish to implement a table of values, where each row has a key/value pair.
Each key is a temperature value, range -5 to 15 step 1, i.e. -5, -4, -3,… 16.
Each value is a temperature value range 30 to 50, step 1. i.e. 30, 31, 32,… 50.
Keys cannot change value by the user.
Values can by changed by the user (user inputs a number in the valid range)
A lovelace card is needed to present the table as a 11 rows x 4 columns grid
The first column is keys -5 to 5 (11 rows)
The second column is is values as input by the user default to 30.
The third column is keys 6 to 16 (11 rows)
The fourth column is values as input by the user default to 30.
A sensor and code is needed that takes the value of an existing sensor.outdoor_temp and looks up that value in the list of keys and returns the corresponding value from the table.
This one really hurt my head as I tried to work out setArray, sensor, attributes … couldn’t work it out
EDIT:
I did look at this for the input card but it doesnt give visual indications of what config does and to be honest it looks an overkill
What it’s doing is looking up a temperature (outdoor_temp) in a list of predefined temperature ranges (keys) and returning a user defined value (value) that has been input in the card.
Sorry I can’t explain it any other way so if you don’t understand then I would respectfully ask that we not get into message motorway or frustration - sorry I can only do what I can do - and lets see if anyone else can help - thank you for your kind understanding
I am not an idiot, I know what a lookup table is. I asked what you need it for to see if there might be a simpler solution to your problem. But the rudeness of your answer accomplished what you want. I won’t be telling you how to solve your problem any time soon.
I am not native either. But I responded to your question, and you asked me to but out because I’m not smart enough to understand what you mean? That is rude in any language. Good luck getting help.
Ahhh @tom_l thank you kind sir , you understood exactly and provide an excellent source of information. I was searching for tables and lookup. Compensation never played in. You are a star and thank you again
@tom_I how might I use a card though. To set datapoints. In that example they are static.
btw, I think you spotted straight away is was a weather compensation curve
To be fair to Edwin, it was difficult to determine that this is what you wanted because you focussed on the problem implementing chosen solution (lookup table), not your actual problem (converting one value to another). This is known as the x-y problem and wastes a lot of time. See: https://xyproblem.info/
It sounded like you wanted an actual table in your dashboard for most of your post as you miscategorised your forum topic. This is a backend (configuration) problem not frontend (dashboards & cards).
Edit: or maybe it isn’t.
You can’t do this with the Compensation integration.
Please tell us what problem you are trying to solve. Not how you want to solve it.
I have looked at the heating manual - it’s all English of course (!) and tehcnical - but it is called a Weather Dependent Compensation Curve.
So I want to set a lists of values for outdoor temperatures and do this through a card. The list of outdoor temperatures are fixed, -5 to 16. The values for each temperature are user input, 30 to 50. The outdoor temperature sensor is read and this value (if in -5 to 16) is used to lookup user value. This user value is then sent to a climate device to set offset. So the colder the outside, the higher the offset, the warmer outside, the lower the offset. This table approach is how want to do it - a UI desire. Could be a different way but this preferred.
I had to phone a friend to explain this and get him to voice this input !!
Wenn du Deutsch kannst, kaan ich dir das ganz leicht erklaren
EDIT:
more info.,…
the heating heats water to a max temp 50C and sends this to emitters to heat home. when hot, heating turned off, when cold, heating on. On,off,on,off… no good for system. Better to run at a lower value for constant time, no on/off. Hence this problem.
Ah ok, so this is the same as your last topic that we had trouble with too.
I have a better idea of what you want to do now.
Applying this sort of heating curve either through an equation in a template sensor or a set of point pairs in a compensation sensor is easy enough. Unfortunately those are not meant ot be changed often and have no frontend interface you can use in your dashboard to do this.
If you only want to tweak these settings seasonally, like one set of points for spring, one for winter etc… we could probably work something out but if you are tweaking them constantly until you get it right then I am sorry I do not know of a solution.
Yes, exactly. You have it understood @tom_l
Yes, at the moment we need to tweak daily/weekly until we have the settings for the season tuned and the system running 24/7 matching heat loss and not cycle on/off/on/off all day.
I suspect we need to tweak through the year for Summertime, Autumn, Winter, Spring.
I see it can be done in Compensation, Files, Excel type integration and others, but this does not give UI control and simply,.
Yes I am having problems with this
Yes I know those helpful sub site, but my partner is english and translating - not very well obviosuly she is helping me with this site and questions and answers. I only gave that german as a mild humour . we prefer here and doing well other than this one topic - perhaps not doing well because it cannot be done natively and we need something else that has yet to be created.
UI - I could just have a list of input_number boxes for key/values but not sure how best to map these to sensors and automate. Need to look further but hence asking for help
OMG! That’s perfect. No … sliders are better !
You’ve done it again @tom_l
I will use that, even got the secret code using some fancy code in the actions bit. I will need to learn that.
That card is exacly what I was looking for and the code is what I couldnt do. Better than my x-y-problem table and row and columns !! I see the x-y-problem now
Excellent. Case closed ! phew, taken days and days lol
Awwww you’re so kind Tom !
“Heat Curve” - not what I used so I need to remember that phrase !
Good luck getting that “tuned in”.
You do not just have to look at the outdoor temperature, but also the wind speed, the wind temperature, the wind direction, the sun heating and maybe also the ground temperature. Just to name a few other factors.
Your idea is not stupid, but you are setting the bar for the precision too high.
Lowering the bar to a realistic precision will also mean you do not have to adjust it that often.
It can be done per season rather than week or day and that means you do not really have to handle all the input of offset values.