Advice how to load sensor info from Plugwise Anna thermostat web interface XML

I chose to use Temporay mainly to indicate that the active schedule is temporarily overridden by a manual set-temperature-change, at the next scheduled change the schedule will take over.
I chose to use Manual to indicate that there in no schedule or no preset active.

Let me know if you can think of improvements!

sure will do. And I understand your thinking.

But, if Temporary, wouldn’t we still need to see the schedule?


and


while the schedule is still Regulier (my schema)

preset Mode explains it best I think. It is a preset. Not a temporary override…

maybe its nitty gritty, but the more you start to look into the thermostat Card, the more confusing it gets…especially eg if displayed values (for current preset mode) are not listed in the possible values for preset mode…

let it rest for now, maybe you’ll find a beter way. If not, its doing its job, and that’s what counts :wink:
thanks for you effort!

Auto indicates that the schedule is active, it will say Heat when you turn off the schedule.
So from Auto and the schedule name (Regulier), or Temporary, or the preset-name you can see on the card what is going on.

haha, was just going to post this:

1final thought which is cause by this reorder of attributes:

what is most confusing is the fact the Anna says it is in Auto mode, while there is a temporary override:

…

been wanting to ask: what happens when we call the service climate.turn_off ? didn’t dare yet… does this turn of the schedule, as you say above, or turn-off the entire Anna.

The Anna showing the schedule-icon you mean? I think this means that the schedule is active in the background; it can be overruledby a manual change to a different temperature or a manually seleted preset. But it will take back control when the next change in the schedule happens.

About climate.turn_off, I actually don’t know what will happen, probably nothing? Because there’s no specific “off”-command in the Anna-code?
OFF is only shown between the ( ) when the schedule is off and the cv-ketel or whatever, is not heating.

ok, thanks, I do think I found a bug though.

The current preset mode only shows no_frost and vacation, if so selected. When selected any of the other 5 available preset modes, it shows Regulier (my selected schema)

I can see the target temps change on the Anna app, so know the presets are functional, as do the icons in the app change.

don’t think the schema’s names should show in the presets at all tbh.

update

not sure what happened, but testing a second time made the preset modes appear. How odd…the screenshot doesn’t lie though… hmm

Did you wait long enough for the change to appear in HA?
It can take up to 30 secs (default update interval Anna component) and under certain conditions up to 60 seconds (default update interval for the general climate component) for a change to become visible.

I discovered recently a way to speed this up, it’s working in my Adam-code, kind of, but it has not been implemented and tested in the Anna-code yet. I’ve suggested CoMPaTech to try this as I no longer can test the Anna-code.

yes, I did wait long enough, they simply went from no-frost to Regulier, (as in the screenshot) which shouldn’t be possible at all…

in the second test, (btw in a second browser window of the same HA instance, not sure if that matters) the preset modes appeared correctly

will see what happens in the next few days, and Ill try to understand why this is possible:

no selected scheme, (while the app clearly shows asleep) and as preset mode my own Schema is displayed…

That is indeed not correct. Selected schema shows none but there are three other indicators showing that the schedule is still active: (Auto), Current state = auto and Current preset mode = Regulier.
Are you sure that your template-code for Select schema provides the correct output ?

well, yeah, cant fail on that:

      kantoor_thermostat_selected_schema:
        friendly_name: Selected schema
        value_template: >
          {{state_attr('climate.kantoor','selected_schema')}}

and, as said, I made a screenshot of the actual climate.kantoor entity. Which has nothing to do with any template whatsoever.

Please also show what is shown under Developer Tools --> States --> climate.kantoor.
That will help me to see the complete picture.

sure, but it is not the same as the post above of course. Preset_mode Regulier…

This is all correct. Preset_mode shows Regulier due to the code that I showed quite a few posts up.
Now, what is wrong in your opinion?

Regulier is not a preset mode, but a schema…
I do understand that bit of code, but it simply isn’t correct.
Especially since it really should show Home, which is the currently selected preset mode.

Earlier you were with me, now not anymore? What happened?

well, tbh, nothing really. I am still with you :wink:

also still with my easier findings. this little quote of mine was specifically meant for

my issue with the preset_modes still stands. I truly find these should be separated. Have a dedicated current preset mode sensor, which selects 1 of the 5 available presets. Next to that, have a sensor for Temporary, Regulier (+ possible extra user schedules) or Manual.

like this:

def preset_mode(self):
        """Return the selected Preset mode.
        

and

def active_schedule(self):
        """Return the Active schedule.
        Or return Temporary in case of a manual change in the set-temperature with a weekschedule active.
        Or return Manual in case of a manual change and no weekschedule active.

maybe even split the last 2, since I would think it very illustrative to see the active schedule in all circumstances.
that would be

def active_schedule(self):
        """Return the Active schedule.

and

def manual_setting(self):
        Or return Temporary in case of a manual change in the set-temperature with a weekschedule active.
        Or return Manual in case of a manual change and no weekschedule active.

If only that were possible. But for climate devices we have to adhere to the format defined by de HA Leaders.

Between the lines I read that you are looking for something looking nice on the HA frontend.
Why not use the Simple Thermostat Card, this is mine:
image

This has everything you may want, you can even change the texts on the buttons.
And it works really well with the present state of the anna-ha-code.

1 Like

which of my suggestions isn’t possible? Can’t imagine the presets_modes need to be be mixed with the schedules by the core HA team. They’re different beasts altogether?

why yes, I do think that is what it should look like…
care to share the code for that? seems a straight c&p is in order. .:+1: (only change might be mdi:hotel…)

Do you use HACS? You can find it in the list.
When not, look here: Lovelace: Simple thermostat card
The link to the code is in the first post.

And my code in ui-lovelace.yaml:

      - type: custom:simple-thermostat
        entity: climate.living_room
        name: Woonkamer
        icon:
          idle: mdi:radiator-disabled
          heating: mdi:radiator
        sensors:
          - attribute: preset_mode
            name: Mode
          - entity: sensor.temperature_xyz
          - entity: sensor.humidity_xyz
          - entity: sensor.pressure_xyz
        control:
          hvac:
            "heat":
              name: Verwarmen
            "auto":
              name: Auto
          preset:
            "home":
              name: Thuis
              icon: mdi:home-circle
            "asleep":
              name: Nacht
              icon: mdi:sleep
            "away":
              name: Afwezig
              icon: mdi:clock-alert-outline
            "vacation":
              name: Vakantie
              icon: mdi:airplane-takeoff
            "no_frost":
              name: Anti-Vorst
              icon: mdi:snowflake-alert

On your first point: if you want to see certain changes, please create an issue in the anna-ha repository: