I have Hunter Douglas blinds, they work correctly in Home Assistant.
Home Assistant maps them as Scenes.
I cannot, for the life of me figure out how to integrate these into Nabu Casa so that I can use these with Google Assistant. I just cannot make them visible to Google at all.
I have tried including/excluding everything, but they just do not appear. I tried aliasing them to a “cover” but this crashed home assistant, and required a bit of work to get it to start up again.
How do I get Scene’s to load in Google Home - or failing that - alias my scenes to Covers that are “blinds” so that I can say: “Hey Google, Close the Blinds”?
The problem seems to be related to how the Hunter Douglas component is loaded. In Home Assistant, the Hunter Douglas Scenes (different from Home Assistant Scenes) are loaded as entities.
So, while I load a “scene” which is the platform for Hunter Douglas, that does not pass the entities which are called scene.12345, scene.12346, scene.12347 which correspond to the states of where the blinds should be.
So far, I have tried aliasing these to scenes and to covers, but to no avail.
In the HA GUI, if I call one of these scenes by saying “activate” then my blinds will go up or down, depending on what the scene in Hunter Douglas specifies.
Make an template cover that represents your blinds.
This is a pain in the ass, I would write up an issue on Github and have the behavior change to make covers. But that’s aside the point.
EXAMPLE
in this example, I am assuming your min is 0, and your max is 12345.
You will need to replace these values with the real values
You will need to let me know if your scenes require leading zeros. e.g. '1' vrs '00001' I am assuming that you need the leading zeros
input_number:
hunter_douglas_cover_position:
name: Cover Position
initial: 0
min: 0 # Put your min position here
max: 12345 # Put your max position here
step: 1
Next make a template cover
cover:
- platform: template
covers:
hunter_douglas_blinds:
friendly_name: Hunter Douglas Blinds
value_template: "{{ states('input_number.hunter_douglas_cover_position') | float > 0 }}"
position_template: >
{{ ((states('input_number.hunter_douglas_cover_position') | float / 12345) * 100) | int }}
open_cover:
- service: input_number.set_value
data:
value: 12345
- service: scene.12345
close_cover:
- service: input_number.set_value
data:
value: 0
- service: scene.00000 # Don't know if zero is 0 or 5 0 characters. This makes a difference.
set_cover_position:
- service_template: >
scene.{{ "{:05d}".format(((position / 100) * 12345) | int) }}
- service: input_number.set_value
data_template:
value: "{{ ((position / 100) * 12345) | int }}"
I will give some of this code a shot, see if Google loads it. I suppose the other solution is just to directly integrate my blinds with Google, but I prefer doing it all through HA.
Ok, I got it working, and the “Work Around” Is hilarious.
I kept trying to find out how to make them appear as “objects” in the Google Home GUI, but then by a happy accident, I discovered you don’t need to.
Seems the services are exposed already, and Google Knows about them, but you can’t see them in the APP GUI itself. Only by mispronouncing one of our items did Google trigger the blinds, and we realized that it already sees the services for the blinds.
So, the solution is, to say:
Hey Google! Turn On All Blinds Up.
Treat it as a switch, and call it as a switch, and it calls the service. I am just going to rename what I call them, but it is just the “Hey Google! Turn on X” that was missing. Klunky to say, but it works.