Skip to content

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

Merged
Danielhiversen merged 1 commit intohome-assistant:devfrom
timmo001:broadlink-use-correct-name
Apr 6, 2018
Merged

Broadlink Switch - Use entity_id instead of friendly_name for entity_id#13642
Danielhiversen merged 1 commit intohome-assistant:devfrom
timmo001:broadlink-use-correct-name

Conversation

@timmo001
Copy link
Copy Markdown
Member

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

VDRainer commented Apr 2, 2018

Fixes issue #11628

@VDRainer
Copy link
Copy Markdown
Contributor

VDRainer commented Apr 6, 2018

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

@Danielhiversen
Copy link
Copy Markdown
Member

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

@timmo001
Copy link
Copy Markdown
Member Author

timmo001 commented Apr 6, 2018

See updated description. Is this what you needed?

@Danielhiversen
Copy link
Copy Markdown
Member

👍

@Danielhiversen Danielhiversen merged commit 1d7ecc2 into home-assistant:dev Apr 6, 2018
@timmo001 timmo001 deleted the broadlink-use-correct-name branch April 6, 2018 10:10
@Yonsm
Copy link
Copy Markdown

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants