How to make a schedule for my thermostat

I have an avatto zigbee thermostat and I get an entity: text.0xa4c1389d6cbf9488_schedule_weekday with a attribute : 07:30/22.0°C 09:30/19.0°C 12:00/19.0°C 15:00/19.0°C 17:00/22.0°C 22:00/18.0°C.

So, it is 6 times a starting hour and temperature during the day.
I am a noob in configuration and in yaml and I like to have on my dashboard a card with a table to change the time and the temperature and write it back to the entity.

My idea is to split the text and then put it in a table and if I change something in the table, put everything together in a string and write it back to the entity.
Or is there a better idea?

But I don’t know where to start. Can somebody help me or point me where I can find some samples to start.

I suggest you consider using this:

Thanks, but then is everything controled by HA.
I like to take the values from the entity of the zigbee thermostat and change that in HA and put it back in the thermostat.
If HA is down or zigbee is down, the thermostat is still working with the new data.

You can use scheduler integration

don’t forget to install also the scheduler-component, won’t work without it…

I think that has the same limitation as what I had suggested, namely an inability to synchronize the thermostat’s schedule with Home Assistant’s schedule.


Unless I have misunderstood the requirements, the goal is to represent the data in this string:

07:30/22.0°C 09:30/19.0°C 12:00/19.0°C 15:00/19.0°C 17:00/22.0°C 22:00/18.0°C

Into something that can be displayed and modified in Home Assistant.

Any modifications to the data made in Home Assistant are written back to the thermostat. In other words, the thermostat’s schedule remains the source of truth and Home Assistant simply serves as the UI for displaying/modifying the thermostat’s schedule.

If that’s correct then the Schedule integration I had originally suggested isn’t applicable for this application.

Yes, I think that is not what I like to do.
I don’t like to make a scheduler automation in HA.
I like to import the schedule attribute of my thermostat, change that in HA and write it back to the thermostat.

That’s true but it does what he wanted at least partially. He can adjust schedules from the dashboard easily…
To be honest, I’m not sure if what Pepe wants is achievable in on go. I’d use scheduler-card and if it is so important to him to have synced those schedules, then I’d use some advanced Node-RED to achieve this.
Without it it doesn’t even make sense because those schedules would act as two independent schedules, and they’d be clashing each other and causing a lot of mess…

Anyway, how often is your HA and Z2M down? Once a year? Is it even worth doing it?

Have you verified that changing the text entity actually overwrites the schedule on the device?

2 Likes

You understood that right, most likely. It just doesn’t make any sense to me :slight_smile:

Anyway, I think it is achievable with input_number helper. He just need to create 1 number helper for each entry and then link it together.

I found this screenshot in another post (about an Avatto thermostat). Is this similar to how your thermostat’s schedule and other properties are displayed?

Well, I just installed the thermostat in HA, If I change the text on the thermostat decive, then I see the change on HA.

If I go to dashboard => overview => click on the 3dots of the thermostat card => again the 3 dots on the next popup => device info, then I can see the text schedule weekdays. I can change the text value and If I push “enter” then it writes it back to the thermostat.

I can use that way if I like to change the schedule.
But, if I have to explain that to my wife, that impossible.
So a card on my dashboard would be easier.

Yes that looks similar

Oh yeah, the wife element. I know something about that one :smiley:
That’s exactly why I suggested scheduler-card, it’s noob-friendly.

It’s not worth even try doing what you want to achieve, too much hassle. Especially when your whole schedule is represented as one line payload.
Just clear it, leave it empty, use scheduler card and you’re done.

Is your HA server down every day or what is the issue there?

No, no problem with my server. I never have it down in the last year since I’am using proxmox and HA. But I had alot of zigbee problems when I’am using raspberry pi 3+.
It was only in case of…

Thanks anyway. I start to make HA automation with scheduler.

In that case, I have an idea how your goal can be achieved. However, dozens of helpers are needed to represent each time/temperature for each day of the week, plus an automation monitoring each helper’s value and ensuring they’re in sync with the thermostat’s corresponding Input Text; it’s an onerous project .

All this to say, guiding you through the process requires far more time than I have available. Hopefully someone else has more free time; good luck.


EDIT

There’s no “table” widget available in Home Assistant’s stock selection of cards so you’re obliged to represent each schedule value by a separate (helper) entity. That’s why I said “dozens” are needed.

@pepe2 which HA/custom integration are you using for the avatto zigbee thermostat?

yes, zigbee2mqtt and HA find my device without problem.

I thought is was a simple question :wink:

Which type?

And are you using the Tuya App?

The question is simple, the answer requires a lot of work.

For example, the data you posted contains six time values and six temperature values for one day. That’s 12 helpers per day for a total of 84 helpers for a week.

If the thermostat’s schedule allows you to have more or less time values per day (i.e. it’s not fixed at six) then that complicates the solution.