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

Fix ZHA force polled entities. #22222

Merged
merged 1 commit into from
Mar 21, 2019

Conversation

Adminiuga
Copy link
Contributor

Description:

Fix "force_polled" ZHA entities.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@ghost ghost assigned Adminiuga Mar 20, 2019
@ghost ghost added the in progress label Mar 20, 2019
@Adminiuga Adminiuga requested a review from dmulcahey March 20, 2019 19:10
@Adminiuga
Copy link
Contributor Author

Ha, this is a nice PR#

@dmulcahey
Copy link
Contributor

can merge when everything passes

@dmulcahey
Copy link
Contributor

Ha, this is a nice PR#

Go play powerball

@dmulcahey dmulcahey added this to the 0.90.1 milestone Mar 20, 2019
@robbiet480 robbiet480 merged commit 9653544 into home-assistant:dev Mar 21, 2019
@ghost ghost removed the in progress label Mar 21, 2019
@Adminiuga Adminiuga deleted the fixes/zha-force-polled branch March 21, 2019 15:00
balloob pushed a commit that referenced this pull request Mar 21, 2019
## Description:
Fix "force_polled" ZHA entities.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [x] There is no commented out code in this PR.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
@balloob balloob mentioned this pull request Mar 21, 2019
@tbrock47
Copy link

Not sure where to post this, but my ZHA devices were reporting better in 90.0 than in 90.1. can someone explain why that would have been? I'd like my devices to respond how they did in 90.0.

@robbiet480
Copy link
Member

@tbrock47 Can you describe exactly the behaviors you are seeing and with what devices?

@tbrock47
Copy link

tbrock47 commented Mar 25, 2019 via email

@robbiet480
Copy link
Member

@tbrock47 This was the right place.

@dmulcahey pulling you in on this, especially interesting since you have Sengled bulbs too and haven't experienced these issues...

@tbrock47
Copy link

Some more details which would probably be helpful...

key value
arch armv7l
dev false
docker false
hassio false
os_name Linux
python_version 3.5.3
timezone America/Denver
version 0.90.1
virtualenv true

All the problem bulbs are Sengled E11-G13.
I have a few zwave devices that work flawlessly.

This is the automation I spoke of that executes a restart when no ZHA devices report online anymore. But as I said, now that their state no longer changes from online, the automation never fires.

alias: Home Assistant ZHA Failure Restart
initial_state: "on"
trigger:
  platform: event
  event_type: state_changed
condition:
  - condition: template
    value_template: "{{ trigger.event.data.new_state.domain == 'zha' }}"
  - condition: template
    value_template: >
      {% set ns = namespace(found=false) %}
      {%- for entity in states.zha -%}
      {% if entity.state == 'online' %}
      {%- set ns.found = true -%}
      {% endif %}
      {%- endfor -%}
      {{ not ns.found }}
action:
  - service: notify.notify
    data_template:
      message: "ZHA Failure Detected. Home Assistant Restarting."
  - service: homeassistant.restart

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Mar 25, 2019

@robbiet480 we want issues reported in the issue tracker. Not in merged PRs.

@tbrock47 Please open a new issue and copy the very good description already posted here. Make sure to fill out the issue template completely. And link to this PR. Thanks!

Here's the link to our issue tracker:
https://github.com/home-assistant/home-assistant/issues

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Mar 25, 2019
@robbiet480
Copy link
Member

@MartinHjelmare you're right, thought this was the issue :(

@tbrock47 Let us know when that new issue is opened, thanks!

@Adminiuga
Copy link
Contributor Author

@tbrock47 Thank you for a good description of the problem. Let me know when you open the issue, but from the description the problem sounds very similar to zigpy/bellows#124 issue. We'll need bellows, zigpy, homeassistant.components.zha and homeassistant.core debug logs to confirm.

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

Successfully merging this pull request may close these issues.

7 participants