Open, Close or Pause Template Cover with Google Assistant or HA UI (RF and Script)

Hi, your suggestion/s please:

My set-up includes Xiaomi Remote Control + integrated RF433mhz which do not report open, close or position state.

I have created 3 RF actions (To send RF signal to open, close or pause the blinds in my study room) in script.yaml file as below:

studyroom_blinds_close:
  alias: Studyroom Blinds Close
  sequence:
  - data:
      command:
      - raw:XXXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command
studyroom_blinds_open:
  alias: Studyroom Blinds Open
  sequence:
  - data:
      command:
      - raw:XXXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command
studyroom_blinds_pause:
  alias: Studyroom Blinds Pause
  sequence:
  - data:
      command:
      - raw:XXX
    entity_id: remote.livingroom_ir_controller
    service: remote.send_command

Yes, I do not need the ‘state’ status to be remembered and basically just one way sending the RF command to the device; I want the device can be called open or close or paused and it will execute.

I created template as below so that i can control it with the UI in HA or Google assistant to control.

cover:
  - platform: template
    covers:
      stuyroom_blinds:
        friendly_name: "Studyroom Blinds"
# I am not sure what should be defined in the value_template to remain the status out of open, close or pause
        value_template: "{{ true }}" 
        open_cover:
          service: script.studyroom_blinds_close
        close_cover:
          service: script.studyroom_blinds_open
        stop_cover:
          service: script.studyroom_blinds_pause

I mainly use Google Assistant or the UI and with the current setting above, the state will stay “true” and i am not able to contro. Is there a way I can activate all 3 buttons in the UI for cover template? Appreciate any suggestion or guidance.
template conver

Thanks,
Terence

Define position_template instead of value_template (can’t have both)

position_template: “50”

Now HA will think it’s always in the middle and allow all 3 buttons

2 Likes

wow, work like a charm!

thank you very much!