MyHome - CEN+ commands

This blueprint lets you use the CEN+ command events of the MyHome Integration by anotherjulien.

Link: MyHome Integration

With this blueprint its possible to toggle non Bticino lights. And with an extra helper boolean its possible to dim the light too. (See screenshots)

blueprint:
  name: Myhome CEN+
  description: Control anything using MyHome CEN+ commands.
  source_url: https://github.com/gST84/myHome_blueprints/blob/f4f3151aab73d85b0ab098b67f51d68e731f534f/CENplus/myhome-cen-plus.yaml
  domain: automation
  input:
    cen_adress:
      name: CEN+ Adress
      selector:
        number:
          min: 0
          max: 2047
          mode: box
          step: 1
  
    cen_pushbutton:
      name: CEN+ Pushbutton
      default: 1
      selector:
        number:
          min: 1
          max: 99
          mode: box
          step: 1

    button_short:
      name: Button press
      description: Action to run on press
      default: []
      selector:
        action: {}
  
    button_long:
      name: Button hold
      description: Action to run on long press
      default: []
      selector:
        action: {}

    button_release:
      name: Button hold release
      description: Action to run on long press release
      default: []
      selector:
        action: {}

mode: restart
max_exceeded: silent  

variables:
  var_cen_adress: !input cen_adress
  var_cen_pushbutton: !input cen_pushbutton

trigger:
- platform: event
  event_type: myhome_cenplus_event


condition:
  condition: and
  conditions:
    - condition: template
      value_template: '{{ trigger.event.data.object == var_cen_adress|int }}'
    - condition: template
      value_template: '{{ trigger.event.data.pushbutton == var_cen_pushbutton|int }}'


action:
- variables:
    event: '{{ trigger.event.data.event }}'
- choose:
  - conditions:
    - '{{ event == "pushbutton_short_press" }}'
    sequence: !input 'button_short'

  - conditions:
    - '{{ event == "pushbutton_long_press" }}'
    sequence: !input 'button_long'

  - conditions:
    - '{{ event == "pushbutton_long_release" }}'
    sequence: !input 'button_release'
 

2 Likes

Thank you for sharing this, it’s really helpful!

Hi, does this mean that there is no CEN / CEN+ programming required in the MyHome installation?

I have configured a H4652/2 with A1 = 1 / P1 = 7 / M1 = CEN
What should I do in the MyHome installation and/or in Homeassistant to have it trigger a Home Assistant automation?

Thanks.

Maikel