I have configured my Philips Hue bridge to assign a first group for my two floor lamps and I want Home Assistant to show a group instead of two floor lamps. Is this possible? I need to be able to control the brightness and color temperature for both two floor lamps. I can only toggle the group’s switch.
And one last question I have is can I do the same with LIFX? Hide both of the bulbs but show only the group’s name?
And lastly, how do I tags in “choose optional tags for the topic” so that my post can be searched easily?
Update after a few minutes later: I guess the search result did not return a thread found in Feature Request when I search for “philips hue group” (without quotes). My bad.
platform: state
entity_id: media_player.kodi
from: “playing”
action:
service: shell_command.hometheater_playing
alias: “Kodi playing”
trigger:
platform: state
entity_id: media_player.kodi
to: “playing”
action:
service: shell_command.hometheater_paused[/code]
I hope this helps everyone who use Philips Hue. Happy home automating!
Actually, I’ve written shell scripts which I put them to use in crontab about a year and a half before I try out Home Assistant, since I plan to expand my home automation setup with multiple devices.
I have a lot of hue groups or “Rooms” which makes it a pain to maintain all the different shell scripts for each room/group.
I’ve extended your shell script to take an additional argument: FNAME (friendly name). Now I can setup all the groups and lights in a single bash script (phue_control.sh):
#!/bin/bash
# INPUT: hue IP & api key
HOST=192.168.10.12
APIKEY=<your_key>
# group/light friendly name
FNAME=$1
# hue command
COMMAND=$2
# INPUT: specify hue type ("groups" or "lights") and ID
case $FNAME in
bedroom)
TYPE="groups"
ID=2
;;
livingroom_sofa)
TYPE="groups"
ID=1
;;
livingroom_table)
TYPE="lights"
ID=3
;;
*)
esac
if [ "$TYPE" == "groups" ] ; then
AS="action"
else
AS="state"
fi
curl -X PUT -H "Content-Type: application/json" -d $COMMAND http://$HOST/api/$APIKEY/$TYPE/$ID/$AS
And thank you for sharing the modification! It would be nice if Home Assistant could support Philips Hue groups right out of the box. The use of shell scripts is only a work around for the delay between API calls to the Hub.
I am planning to get rid of my starter kit as I have switched over to LIFX for that reason: to control multiple lights at once without a delay between API calls.
But at least I have something to contribute for those who need the script.