Can you open the blinds only 10% or 20%?


#1

Is there a way to open your blinds to 10% or 20%. The sun… ah the lovely sun is setting in our bedroom and making it very bright and hot. It would be nice to issue a command to open them with a small amount of light coming in like 10% or 20%. Is there a way to do that with the MQTT or with the Home Assistant? I would assume you would have to put this 10% or 20% into the configuration of the blinds in the YAML file.


#2

With Version 6 and above. this can be done with MQTT command.
cmnd/BlindControl2/POWER payload 10 or 20 etc
sub the BlindControl2 with your device topic or device name.
You should be able to add a configuration in home assistant ,
I am not sure on using home assist well as I use Openhab3
you should be able to set something up in home assist with a slider function etc (I have one setup in openhab as well as buttons.

I am working on a ymal config for home assist but still trying to get head around it.

In answer to your question YES percentage control is available

Another post on this site had a YMAL with a tilt option I am looking at.


#3

Nice… working with the MQTT monitor putting this in worked.

cmnd/MK-SmartHouse/utilities/MK-BlindsControl1/POWER = 85

Getting it to work with a button press would be cool too, but at least there is an ability to do it!

Thanks so much!


#4

What I have done in home assistant is added an input slider and set it for my preferred step value. If you want to go in 10% increments then you just need to set the step value to 10. Then you just need two automations. The first automation will take the input of the slider and publish an MQTT to the proper device. The second automation syncs up the slider to the MQTT if another automation or a manual change is made to the blinds. You do want that slider representing the accurate position at all times.

The following yaml are samples from my config. Note that I use packages for most devices now, but if you are still using the original config locations then the main blinds configs would be in covers.yaml, the input slider is configured in inputs.yaml and of course the automations would be in automations.yaml.

Some assumptions - you have already configured and have working your covers.yaml or you have the blinds working and MQTT is properly configured. I also use a generic device naming scheme like blindssetting1 and blindscontrol1 as I use the name and customize functions to assign human readable names to the devices in Home Assistant. But please customize the naming as you choose. it is not relevant as long as you use the same names consistently. On the automations, the ID will be generated by your system. Please don’t use the sample id’s as shown below. And again, please check the yaml syntax as I pulled these directly out of my package file for the blinds. There may be some slight differences if you use the standard config locations.

You can find all info on the inputs at https://www.home-assistant.io/integrations/input_number/

Inside of inputs.yaml

input_number:
  blindssetting1:
    name: My_Blinds
    min: 0
    max: 100
    step: 10
    mode: slider

Inside of automations.yaml

- id: '1234567890'
  alias: Control Blinds with slider
  trigger:
  - entity_id: input_number.blindssetting1
    platform: state
  condition: []
  action:
    service: mqtt.publish
    data_template:
      topic: cmnd/blindscontrol1/POWER
      retain: true
      payload: '{{ states(''input_number.blindssetting1'') | int }}'
- id: '0987654321'
  alias: Sync Blinds Controller
  trigger:
  - platform: mqtt
    topic: cmnd/blindscontrol1/POWER
  condition: []
  action:
    service: input_number.set_value
    data_template:
      entity_id: input_number.blindssetting1
      value: '{{ trigger.payload }}'

And once you have it all added to a card on your Home Assistant you should end up with something like this

blinds%20with%20slider%20in%20HA

Note my custom naming and the use of some MDI icons in the customize file.


#5

Thank you for your setup. files. question regarding the - id: ‘1234567890’ is this unique etc ?
I am having a lot of frustration setting up homeassist. (I use Openhab 3). But would like to have both so I can test new versions on both platforms.
Also are you able to put a button in you example to change the speed from slow to fast.?

topic would be cmnd/blindcontrol1/SPEED

could you include your covers.ymal too so I can try to understand it to and get it going.

your help will be great.


#6

@Mountain sorry for the delay in responding.

The ID number is a unique number in HA. It can be manually set, but I normally just use the GUI to generate a stub automation, then go in and change it at will in my text editor. Look here for info on the automation editor https://www.home-assistant.io/docs/automation/editor/ Until the automation editor and HA automations provide functionality similar to NodeRed, anything more than a simple “turn on device at this time” or similar required templates which adds layers of complications to the learning curve.

As to my yaml for the covers - this is what I use. Some notes on this config are that I used it with the original MK firmware releases and since your firmware has moved to allowing for left v right placement and close up v down some of this code is probably outdated.

covers.yaml
- platform: mqtt
name: “LR-left-blinds”
command_topic: “cmnd/blindscontrol1/POWER”
state_topic: “stat/blindscontrol1/STATE”
retain: false
payload_open: “0”
payload_close: “100”
payload_stop: “56”
state_open: “0”
state_closed: “100”

Hope that helps!


#7

Thanks for your setup. will try to add to my test home assistant.

your covers.yaml still will work because all the conversion is done on the firmware from left and right install and swing up or down.
meaning open is 0 and closed is 100. and the stat is reported back correctly.


#8

Excellent, this sounds to answer almost exactly one of my biggest questions. We have a dozen or more floor to ceiling verticals, and I’d hoped to customise their openings to follow the sun.

I’ve yet to buy my first, but now it sounds a no-brainer.


#9

Yes thanks for the positive feedback. This new option will work. Set open Limit and set closed limit.
My current testing of firmware is looking good to release as a beta version
New version has home assist auto discovery and openhab auto discovery all at basic level.
also unique id will auto generate etc in the ymal auto config
more advanced features will need manual entry in either home assistant or openhab…(Can’t cover all possibilities)…
The new version will be v7…
I can make the link for download available if interested, as I had a server failure 2 weeks ago and backups failed. So I have rebuilt my site mesmarthouse.com to bare bones. Web page has to be re built but all firmware for blind control is available for down load via a link from this site or the auto update link via v6 blindcontrol firmware…
If you are running V2 which is the original by Matt’s project then will need the direct link for download and manual install.

I am in the final stage of testing code as to reporting state to correct settings

let me know please