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

Broadlink Switch - Use entity_id instead of friendly_name for entity_id #13642

Merged
merged 1 commit into from Apr 6, 2018

Conversation

Projects
None yet
5 participants
@timmo001
Contributor

timmo001 commented Apr 2, 2018

Description:

The current version of this component uses the friendly_name instead of the set entity_id as set in the config. This fixes this issue. In the example, the entity_id would be 'tv_phillips' and the friendly_name 'Phillips TV Power'.

Example entry for configuration.yaml (if applicable):

switch:
  - platform: broadlink
    host: 192.168.1.2
    mac: 'B4:43:0D:CC:0F:58'
    timeout: 15
    switches:
      tv_phillips:
        friendly_name: "Phillips TV Power"
        command_on: 'JgAcAB0dHB44HhweGx4cHR06HB0cHhwdHB8bHhwADQUAAAAAAAAAAAAAAAA='
        command_off: 'JgAaABweOR4bHhwdHB4dHRw6HhsdHR0dOTocAA0FAAAAAAAAAAAAAAAAAAA='

Breaking Change

Users who were using this switch with the entity_id and the friendly_name as different names will need to update their automations/groups to use the entity_id instead of the friendly_name.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
@VDRainer

This comment has been minimized.

VDRainer commented Apr 2, 2018

Fixes issue #11628

@VDRainer

This comment has been minimized.

VDRainer commented Apr 6, 2018

Why label "docs-missing"?
I think the docs are correct when this PR is merged.

@Danielhiversen

This comment has been minimized.

Member

Danielhiversen commented Apr 6, 2018

Yes, you are right.
But we need a breaking-change note, that describes how the user should update the config

@timmo001

This comment has been minimized.

Contributor

timmo001 commented Apr 6, 2018

See updated description. Is this what you needed?

@Danielhiversen

This comment has been minimized.

Member

Danielhiversen commented Apr 6, 2018

👍

@Danielhiversen Danielhiversen merged commit 1d7ecc2 into home-assistant:dev Apr 6, 2018

5 checks passed

WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.77%
Details
hound No violations found. Woof!

@timmo001 timmo001 deleted the timmo001:broadlink-use-correct-name branch Apr 6, 2018

@Yonsm

This comment has been minimized.

Contributor

Yonsm commented Apr 7, 2018

class BroadlinkSP1Switch(BroadlinkRMSwitch):
...
super().init(friendly_name, device, None, None) # Case an error (missing one param) on:

switch:

  • platform: broadlink
    host: 192.168.1.20
    mac: 34:EA:34:B8:36:AC
    friendly_name: Outlet
    type: spmini2
@Danielhiversen

This comment has been minimized.

Member

Danielhiversen commented Apr 7, 2018

This is already merged, so please open an issue.

@home-assistant home-assistant locked and limited conversation to collaborators Apr 7, 2018

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