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

Climate Trigger event not firing after upgrade to 3.4.12 #526

Open
2d53 opened this issue Nov 16, 2024 · 2 comments
Open

Climate Trigger event not firing after upgrade to 3.4.12 #526

2d53 opened this issue Nov 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@2d53
Copy link

2d53 commented Nov 16, 2024

I have automation to turn on a switch, triggered when climate.wiser_bathroom starts heating, and to turn it off when it stops heating. Has worked perfectly for a year.
After upgrade to 3.4.12, the triggers did not fire at all. Nothing in the logbook.

Reverted to 3.4.10 and everything back to normal, and the logbook shows

Bathroom UFH On triggered by event 'wiser_event'
10:29:52 - 16 minutes ago
ShellyP1PMUFH Switch 0 turned on triggered by automation Bathroom UFH On triggered by event 'wiser_event'
10:29:52 - 16 minutes ago

Example of the automation

alias: Bathroom UFH On
description: ""
mode: single
triggers:
  - device_id: 82a3c4c7a46f7df03930d13530027fac
    domain: wiser
    entity_id: climate.wiser_bathroom
    type: started_heating
    trigger: device
conditions:
  - condition: state
    entity_id: input_boolean.holiday
    state: "off"
actions:
  - type: turn_on
    device_id: dae819da62210423b3f67ea1758117f8
    entity_id: f3c5a8543ffaff662b39c2124fd7710b
    domain: switch
@msp1974 msp1974 added the bug Something isn't working label Nov 16, 2024
@msp1974
Copy link
Collaborator

msp1974 commented Nov 16, 2024

Just tested and yes it is not working for anything that is a true/false event. I will fix in next release. In the meantime, either downgrade to v3.4.11 or you can amend the following code.

In custom_components/wiser/events.py change line line 70 from

            hasattr(old_state, event[CONF_ATTRIBUTE])
            and getattr(new_state, event[CONF_ATTRIBUTE])
            and getattr(old_state, event[CONF_ATTRIBUTE])

to

            hasattr(old_state, event[CONF_ATTRIBUTE])
            and getattr(new_state, event[CONF_ATTRIBUTE]) is not None
            and getattr(old_state, event[CONF_ATTRIBUTE]) is not None

Like this (now in dev branch) -

hasattr(old_state, event[CONF_ATTRIBUTE])

@2d53
Copy link
Author

2d53 commented Nov 16, 2024

Thanks for the prompt response Mark. I'll stay at 3.4.10 until the next release comes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants