Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One condition never met #6

Open
aabafra opened this issue Jan 18, 2022 · 1 comment
Open

One condition never met #6

aabafra opened this issue Jan 18, 2022 · 1 comment

Comments

@aabafra
Copy link

aabafra commented Jan 18, 2022

Hi, first of all, I'd like to thank you for your code. It's something I was really looking forward to and I didn't have a clue how to face it..

I've tado valves and Airzone so this approach is perfect to me.

I'm finding a problem with the following condition that is never met:

      # Only run if offset hasn't been changed for longer than back_off
      - "{{ (as_timestamp(last_updated) < as_timestamp(utcnow() - timedelta(seconds=back_off_secs|int))) if battery_saver else true }}"

I think that the problem is that the entity never has the attribute 'offset_last_changed' (it just doesn't exist). I don't know if it is supposed to create it into the entity in the following line or it is just a variable that should be retained til the next try (not sure if it works like that).

      last_updated: >
        {{ state_attr(climate_id, 'offset_last_changed') if state_attr(climate_id, 'offset_last_changed') != None else utcnow() - timedelta(seconds=(back_off_secs|int +100)) }}

Thanks and sorry for the inconvenience.. hope I made it clear..

@north3221
Copy link
Owner

yeah there is a note in the readme about that (the NB) as tado integration needs a pr for that to work... as I had my own code running in custom_component its all worked for me and havent had time to do the code updates... just started this weekend getting everything updated...

I've got ha core locally now and done first pr for tado... will be doing the other pr's I need to do soon, so this should start working (assuming pr accepted) soon ish

I'll leave this issue open for now till fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants