Home Assistant Master YMAL HELP V7 blind Control


#1

I am re coding blindcontrol v7 firmware to include Home Assistant Auto Discovery with all the bells etc as per example in covers.
I have coded a basic Auto Discovery but am running in to some problems implementing all the functions as I do not use Home Assistant in my home, only as a test setup.
I would like some Home assistant Users to help me setup the ymal for auto generation.
I am having problems getting Payload ‘’ is not numeric. And Payload is not supported (e.g. open, closed, opening, closing, stopped):.

This is the code for Auto Discovery to inject into home assistant.
Based on the full example in covers
_identifier; ////auto set Friendly name converted removing spaces and converting to lower case
e.g .Friendly Name = Kitchen Blind
_identifier = kitchen_blind

platform = “mqtt”;
~ = _identifier;
name = Friendly Name;
unique_id = _identifier;
json_attr_t = “~/attr”;
command_topic = “cmnd/”+_identifier+"/POWER";
state_topic = “stat/”+_identifier+"/STATE";
position_topic = “stat/”+_identifier+"/position";
availability_topic = “tele/”+_identifier+"/LWT";
retain = false;
payload_open = “open”;
payload_close = “close”;
payload_stop = “STOP”;
state_open = “0”;
state_opening = “opening”;
state_closed = “180”;
state_closing = “closing”;
payload_available = “Online”;
payload_not_available = “Offline”;
position_open = 0;
position_closed = 180;
optimistic = false;
value_template = “{{ value.x }}”;
position_template = “{{ value.y }}”;
tilt_command_topic = “cmnd/”+_identifier+"/POWER";
tilt_status_topic = “stat/”+_identifier+"/tilt-state";
tilt_status_template = “{{ value_json[‘PWM’][‘PWM1’] }}”;
tilt_min = 0;
tilt_max = 100;
tilt_closed_value = 0;
tilt_opened_value = 100;
device_class = “blind”;

I am not sure on the value templates and position template or tilt_status_template.

What I am looking for is a up down stop , or open close option also with a slider option or tilt option to open between open and closed limits.

May be I have too many options listed in ymal and are not needed ???

Also in this new version I have coded you can set your open and closed limit

Your help will be great as I am stuck on this Home assistant intergration


#2

Hey

This is what my current config is for my blinds

cover:
  - platform: mqtt
    name: "Lounge Blinds1"
    command_topic: "cmnd/blind1/POWER"
    state_topic: "stat/blind1/STATE"
    retain: true
    payload_open: "50"
    payload_close: "0"
    payload_stop: "75"
    state_open: "50"
    state_closed: "0"

  - platform: mqtt
    name: "Lounge Blinds2"
    command_topic: "cmnd/blind2/POWER"
    state_topic: "stat/blind2/STATE"
    retain: true
    payload_open: "50"
    payload_close: "0"
    payload_stop: "75"
    state_open: "50"
    state_closed: "0"

#3

Here’s what I have.

  • platform: mqtt
    name: “Right Window Blinds”
    command_topic: “cmnd/blinds1/POWER”
    state_topic: “stat/blinds1/STATE”
    device_class: ‘shutter’
    retain: false
    payload_open: 60
    payload_close: 0
    payload_stop: 60
    state_open: 60
    state_closed: 0
    tilt_command_topic: “cmnd/blinds1/tilt”
    tilt_status_topic: “stat/blinds1/STATE”
    tilt_min: 0
    tilt_max: 100
    tilt_closed_value: 0
    tilt_opened_value: 100


#4

Are you guys have problems with your blinds twitching after restarting your home assistant server?

And here’s my YMAL folder

Cover Livingroom-blinds1:

  • platform: mqtt
    name: “Livingroom-Blinds1”
    command_topic: “cmnd/Livingroom-Blinds1/POWER”
    state_topic: “stat/Livingroom-Blinds1/STATE”
    retain: false
    payload_open: “70”
    payload_close: “0”
    payload_stop: “30”
    state_open: “70”
    state_closed: “0”

cover LivingRoom-Blinds2:

  • platform: mqtt
    name: “LivingRoom-Blinds2”
    command_topic: “cmnd/Livingroom-Blinds2/POWER”
    state_topic: “stat/Livingroom-Blinds2/STATE”
    retain: false
    payload_open: “50”
    payload_close: “100”
    payload_stop: “80”
    state_open: “50”
    state_closed: “100”

cover kitchen-Blinds:

  • platform: mqtt
    name: “kitchen-Blinds”
    command_topic: “cmnd/Kitchen-Blinds/POWER”
    state_topic: “stat/Kitchen-Blinds/STATE”
    retain: false
    payload_open: “71”
    payload_close: “4”
    payload_stop: “30”
    state_open: “71”
    state_closed: “4”

cover Masterbedroom-blinds:

  • platform: mqtt
    name: “Masterbedroom-Blinds”
    command_topic: “cmnd/Masterbedroom-Blinds/POWER”
    state_topic: “stat/Masterbedroom-Blinds/STATE”
    retain: false
    payload_open: “10”
    payload_close: “75”
    payload_stop: “30”
    state_open: “10”
    state_closed: “75”

cover Diningroom-Blinds:

  • platform: mqtt
    name: “Diningroom-Blinds”
    command_topic: “cmnd/Diningroom-Blinds/POWER”
    state_topic: “stat/Diningroom-Blinds/STATE”
    retain: false
    payload_open: “55”
    payload_close: “0”
    payload_stop: “99”
    state_open: “55”
    state_closed: “0”

#5

look at the “Blind Control V6.5 upgrade” topic…check MQTT database for Retained messages. I cleared anything I saw and never had it happen again.


#6

I deleted all the Retained Messages in the cmnd section but should I delete them from the LWT section


#7

LWT messages can stay.
Its the cmnd messages that causes problems


#8

Thanks for the input on ymal’s
I have noticed that there are different payload_open settings .
I assume these are you desired open limit positions, and are not necessarily the full open position.??
(the new version will have set open and closed limits via GUI which will also set payload_open etc in the auto discovery generation)
The above ymal’s are simple, which I like. will cut down the one I am working on. Keep it simple


#9

Hi Mountain, correct…the 60 value in my config is the halfway point for my brand of horizontal blinds. When we tell google to open the blinds, it stops at the 60 mark.


#10

After recently moving to Home Assistant, I found that the entries require the unique_id set. Here is one of my entries in the yaml:

cover Blinds101:

  • platform: mqtt
    name: “Dining Blinds”
    unique_id: blinds101
    command_topic: “cmnd/Blinds101/POWER”
    state_topic: “cmnd/Blinds101/STATE”
    retain: false
    payload_open: “0”
    payload_close: “100”
    payload_stop: “50”
    state_open: “0”
    state_closed: “100”

specs: Mosquitto broker 5.1.1; HA core-2021.4.6


#11

Thanks ymal 's
the new version will auto generate unique_id.
example
Full Name: Dining Blinds
unique_id : dining_blinds