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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle StorageError in the Broadlink integration #35986

Merged
merged 2 commits into from May 23, 2020

Conversation

felipediel
Copy link
Contributor

Proposed change

In learning mode, devices of type 0x2737, 0x5f36 and RM4 series raise a StorageError when we try to read the code before it is stored in memory. It is simple to deal with this error, we just need to wait and retry.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
script:
  learn_tv_power_button:
    sequence:
      - service: remote.learn_command
        data:
          entity_id: remote.bedroom
          device: tv
          command: power

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

@probot-home-assistant
Copy link

Hey there @Danielhiversen, mind taking a look at this pull request as its been labeled with a integration (broadlink) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev May 22, 2020
@felipediel felipediel marked this pull request as draft May 22, 2020 17:59
@felipediel felipediel marked this pull request as ready for review May 22, 2020 19:02
Dev automation moved this from By Code Owner to Reviewer approved May 22, 2020
@MartinHjelmare
Copy link
Member

Should we tag this for a patch release?

Copy link
Contributor

@elupus elupus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@felipediel
Copy link
Contributor Author

@MartinHjelmare I think it's a good idea.

@MartinHjelmare MartinHjelmare added this to the 0.110.2 milestone May 22, 2020
@frenck frenck merged commit 3d253fa into home-assistant:dev May 23, 2020
Dev automation moved this from Reviewer approved to Done May 23, 2020
@frenck frenck mentioned this pull request May 24, 2020
@ciumagcatalin
Copy link

I am able to replicate this on 0.111.4. I also had same issue on 0.110.2 and I just upgraded.
I have 2 rm mini 3 and one works (it is 3 years old). The new one that I just got does not work.

@ciumagcatalin
Copy link

ciumagcatalin commented Jun 18, 2020

I am able to replicate this on 0.111.4. I also had same issue on 0.110.2 and I just upgraded.
I have 2 rm mini 3 and one works (it is 3 years old). The new one that I just got does not work.

I actually made it work after I put the "type" parameter in the remote and the switch. Not sure why is needed if optional. And the steps was to learn the commands and then add the switch.

@felipediel
Copy link
Contributor Author

@ciumagcatalin The problem was with your config. It is necessary to inform the type for the latest Broadlink devices (see the troubleshooting section in the docs). Things will get simpler after this PR.

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

Successfully merging this pull request may close these issues.

The device storage is full when trying to learn new codes on broadlink.remote component
7 participants