home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.4k forks source link

Broadlink Switch Not Working on 0.109.6 #35643

Closed levipereira closed 4 years ago

levipereira commented 4 years ago

The problem

After upgrade HAS from 0.108.9 to 0.109.6 the error below is raised. Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data['host'].

Environment

 - platform: broadlink
   host: rm_mini
   mac: redacted
   timeout: 15
   type: rm_mini
   friendly_name: Broadlink

Traceback/Error logs

Failed config
  switch.broadlink:
    - Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data['host']. Got 'rm_mini'. (See ?, line ?).
    - platform: broadlink
      friendly_name: Broadlink
      host: rm_mini
      mac: redacted
      timeout: 15
      type: rm_mini

Additional information

Is working on homeassistant==0.108.9 without issues.

probot-home-assistant[bot] commented 4 years ago

broadlink documentation broadlink source (message by IssueLinks)

probot-home-assistant[bot] commented 4 years ago

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

felipediel commented 4 years ago

rm_mini is not a valid hostname. Please use the IP address instead.

levipereira commented 4 years ago

I tried rm_mini.mydomain.net and also does not worked. rm mini it become a reserved word on switch configuration?

felipediel commented 4 years ago

The problem is the underscore, which is not in line with the standard for hostnames, but Broadlink engineers decided to adopt it. I will modify the validation method to accept it. It will take a while to merge. You can use the IP address for now.