Skip to content

Align switch group handling with light.#7577

Merged
balloob merged 1 commit into
home-assistant:devfrom
aequitas:switchgroup
Jun 2, 2017
Merged

Align switch group handling with light.#7577
balloob merged 1 commit into
home-assistant:devfrom
aequitas:switchgroup

Conversation

@aequitas
Copy link
Copy Markdown
Contributor

Description:

In preparation of switching to dispatcher and already providing this feature to user. This will allow rflink switch entities to respond to rflink group command.

Fixes: #7522

@mention-bot
Copy link
Copy Markdown

@aequitas, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @martinfrancois and @pvizeli to be potential reviewers.

Copy link
Copy Markdown
Contributor

@martinfrancois martinfrancois 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, although I couldn't really test it myself, since I don't own any devices like that. Would be interesting to hear from @bobmccall since he/she opened the issue up if it was fixed.

@kitkat270
Copy link
Copy Markdown

Happy to give it a go, but not being a developer you'll need to tell me exactly which files to put where.

I've tried copying the new rflink.py into
/usr/local/lib/python3.4/dist-packages/homeassistant/components/switch & restarting, but still I saw the same problem with alloff. I have no idea if this is the right thing to do?

Not sure what to do with the other two files tests/components/light/test_rflink.py and tests/components/switch/test_rflink.py?
Thanks

@aequitas
Copy link
Copy Markdown
Contributor Author

If you place just the rflink.py in <configuration>/custom_components/switch/rflink.py it should be good.

@kitkat270
Copy link
Copy Markdown

OK, given it a go...
I have 3 newkaku switches as configured here https://github.com/home-assistant/home-assistant/issues/7522.
Restart HA with new rflink.py in /home/homeassistant/.homeassistant/custom_components/switch

Turn on switch 3 with remote - switch turns on
Turn off with alloff - switch 1 turns off, switch 2 no action, switch 3 remains on

Here is what we have in the log...
2017-05-24 21:40:57 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'newkaku_00bbbd1e_3', 'command': 'on'}
2017-05-24 21:40:57 DEBUG (MainThread) [homeassistant.components.rflink] passing event to [<Entity Lounge Light 3: off>]
2017-05-24 21:41:06 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'newkaku_00bbbd1e_1', 'command': 'alloff'}
2017-05-24 21:41:06 DEBUG (MainThread) [homeassistant.components.rflink] passing event to []

@aequitas
Copy link
Copy Markdown
Contributor Author

Can you try adding the group aliases in the configuration: #5969 (comment)

This is currently not documented.

@kitkat270
Copy link
Copy Markdown

Yes! That works great.

newkaku_00bbbd1e_1:
name: Lounge TV and audio
newkaku_00bbbd1e_2:
name: Lounge Light 2
group_aliasses: newkaku_00bbbd1e_1
newkaku_00bbbd1e_3:
name: Lounge Light 3
group_aliasses: newkaku_00bbbd1e_1

Really appreciate the fantastic work you've done with HA - thanks.

@balloob balloob merged commit d472d81 into home-assistant:dev Jun 2, 2017
@balloob balloob mentioned this pull request Jun 2, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Sep 4, 2017
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.

7 participants