Help with controlling Hue lights through Home Assistant & Reactor
-
Ok so I am trying to do something that I think is simple but apparently not LOL. I want to turn a hue light on yellow when a condition is met. Basically we have really high humidity here in the evenings. When the garage door is open and the humidity is over 60% then I want my hue garage door light to be yellow. If below 60% then I want it to be white. This is simple enough.
Here is my problem. I cannot find anyway to control the hue color directly from Reactor. There is an x_hass_light.turn_on function but it doesn't do anything when you define a color.
No problem, I will create a scene in Home Assistant and set my color there, then call that scene from Reactor. (Not elegant, but will work). Created a scene, works great and sets my color the way I want it.
I go back into Reactor -> Entity Action -> Garage Door Yellow (scene name) and then there is this annoying little box that requires a selection when there is no selection available. There is nothing for me to select and I cannot save because it is expecting input.
Can anyone give me some advice on how to accomplish what I am trying to do? I would like a way to do this 100% in reactor (set the light to a color of my choosing) but I am OK with a workaround by using HA scenes. I just need it to work without asking me for a section input that isnt there.
My next step is to create a virtual switch in Vera, then create a an automation in HA that will trigger my color. Then use Reactor to trigger the virtual switch... I think that is kludge and will likely confuse me months later when I go to edit a rule and forget this workflow...
-
So here's a pretty hacky way I go about creating actions within Reactor to control HA devices. If the entity doesn't support the commands that are built into MSR, I usually call a system service. To do so your entity would be your Home Assistant System or whatever you have it named. Your action would be
x_hass_system.call_service
.This part I am kind of going off my knowledge of HA since I don't have any Hue lights. What I usually do is create an automation and call the service that sets the hue lights color. Then I click edit in YAML, copy over everything after
service
anddata
then use a website like this one to convert the YAML to JSON. Using the JSON output, put that into thedata
section in the Reactor action (you can delete the automation since we don't need it anymore). Do a test run and see if it works, sometimes HA doesn't like havingtrigger
in the data so you likely will have to play around with the converted JSON string to get it to work.If all else fails what you can do is create the automation in HA and trigger the automation in Reactor here a link to a thread where I did just that. The only downside is you have two places where a automation occurs which isn't ideal.
-
Ok so I am trying to do something that I think is simple but apparently not LOL. I want to turn a hue light on yellow when a condition is met. Basically we have really high humidity here in the evenings. When the garage door is open and the humidity is over 60% then I want my hue garage door light to be yellow. If below 60% then I want it to be white. This is simple enough.
Here is my problem. I cannot find anyway to control the hue color directly from Reactor. There is an x_hass_light.turn_on function but it doesn't do anything when you define a color.
No problem, I will create a scene in Home Assistant and set my color there, then call that scene from Reactor. (Not elegant, but will work). Created a scene, works great and sets my color the way I want it.
I go back into Reactor -> Entity Action -> Garage Door Yellow (scene name) and then there is this annoying little box that requires a selection when there is no selection available. There is nothing for me to select and I cannot save because it is expecting input.
Can anyone give me some advice on how to accomplish what I am trying to do? I would like a way to do this 100% in reactor (set the light to a color of my choosing) but I am OK with a workaround by using HA scenes. I just need it to work without asking me for a section input that isnt there.
My next step is to create a virtual switch in Vera, then create a an automation in HA that will trigger my color. Then use Reactor to trigger the virtual switch... I think that is kludge and will likely confuse me months later when I go to edit a rule and forget this workflow...
@sethlampman Huh. I never implemented the
scene
domain from HA. I'll get that into the next release (this weekend). If you don't want to wait, @Pabla 's method usingcall_service
is correct (see example below of both workaround and final post-update method).Edit: Fixed an error in the graphic noted below.
-
@sethlampman Huh. I never implemented the
scene
domain from HA. I'll get that into the next release (this weekend). If you don't want to wait, @Pabla 's method usingcall_service
is correct (see example below of both workaround and final post-update method).Edit: Fixed an error in the graphic noted below.
@toggledbits thanks that works great (the workaround). One slight typo though, you have script instead of scene in the graphic.
-
T toggledbits locked this topic on