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

HA v0.98+ If you disable alexa_media created switches they will still be reported to HA #317

Closed
skynet01 opened this issue Aug 30, 2019 · 2 comments · Fixed by #371
Closed
Labels
bug Something isn't working

Comments

@skynet01
Copy link

Describe the bug
Disable an alexa_media sensor using the new entities feature. For example a shuffle switch entity like: switch.alexa_dot_shuffle_switch

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'entities under config, find an alexa media switch entity and disable it'
  2. Click on 'entity like switch.alexa_dot_shuffle_switch'
  3. reboot HA
  4. See error in console:

Entity switch.alexa_dot_shuffle_switch is incorrectly being triggered for updates while it is disabled. This is a bug in the alexa_media integration.

Expected behavior
no error

Screenshots
see error in console

System details

  • Home-assistant (0.98.1):
  • Hassio (Yes/No): Yes
  • alexa_media (version from const.py or HA startup): 2.0.0
  • alexapy (version from pip show alexapy or HA startup): latest

Additional context
Add any other context about the problem here.

@skynet01 skynet01 changed the title HA v0.98+ If you disable some alexa_media sensors they will still be reported HA v0.98+ If you disable some alexa_media switches they will still be reported to HA Aug 30, 2019
@skynet01 skynet01 changed the title HA v0.98+ If you disable some alexa_media switches they will still be reported to HA HA v0.98+ If you disable alexa_media created switches they will still be reported to HA Aug 30, 2019
@alandtse alandtse added the bug Something isn't working label Aug 31, 2019
@alandtse
Copy link
Owner

Issue is entities must check self.enabled before attempting to update state.

        if self.enabled:
            _LOGGER.debug("Event %s (%s)", self.name, self._device.modelType)
            self.async_schedule_update_ha_state()

See example.

@holdestmade
Copy link

Same issue here

alandtse added a commit that referenced this issue Sep 3, 2019
fix: add checks for self.enabled prior to HA updates
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

Successfully merging a pull request may close this issue.

3 participants