Skip to content

Handle StorageError in the Broadlink integration#35986

Merged
frenck merged 2 commits intohome-assistant:devfrom
felipediel:fix-learning
May 23, 2020
Merged

Handle StorageError in the Broadlink integration#35986
frenck merged 2 commits intohome-assistant:devfrom
felipediel:fix-learning

Conversation

@felipediel
Copy link
Copy Markdown
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
Copy Markdown

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)

@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
@MartinHjelmare
Copy link
Copy Markdown
Member

Should we tag this for a patch release?

Copy link
Copy Markdown
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
Copy Markdown
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
@frenck frenck mentioned this pull request May 24, 2020
@ciumagcatalin
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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

None yet

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