Shelly 2.5 with ESPHome... No action in automation

Hi There All together,
I have 18 Shelly 2.5 with ESPHome working on my HomeAssistant (all of them are Roller Shutter) and I have a problem with one of them.
When I want to use it in a Automation, i can’t choose a Action for it.


Everything is fine on my Dashboard. It is just the automation.
I have no idea what could be wrong.
Maybe here is someone who has an idea where the problem could be.
Like i already mentioned, I have 18 Shelly in my HA and the coding ist the same.

So Please help :slightly_smiling_face:

Thank a lot!

David

Please post your code. And please note that we can’t read the screenshot as it isn’t in english.

Hi,
thanks for your answer.
OK here is the coding of the NOT 100% working shelly:

esphome:
  name: rollo-og-frida-sued-210
  platform: ESP8266
  board: esp01_1m

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
  power_save_mode: none
  fast_connect: true
  output_power: 20dB
#  manual_ip:
#   static_ip: 192.168.1.201
#   gateway: 192.168.1.1
#   subnet: 255.255.255.0

  ap:
    ssid: "rollo_og_frida_sued_210"
    password: "XXXXXXXX"

captive_portal:

logger:

api:

ota:
  password: "XXXXXXXX"

switch:
  - platform: gpio
    pin: GPIO4
    name: "Relay #1"
    internal: true
    id: relay1
    interlock: &interlock_group [relay1, relay2]

  - platform: gpio
    pin: GPIO15
    name: "Relay #2"
    internal: true
    id: relay2
    interlock: *interlock_group

  - platform: template
    id: block_control
    name: " Rollo Block Control"
    optimistic: true

  - platform: template
    name: "Move UP"
    internal: true
    optimistic: true
    lambda: |-
      if (id(switch2).state && !id(block_control).state) {
        return true;
      } else {
        return false;
      }
######FÜR TASTER######
#    turn_on_action:
#      then:
#        cover.open: rolladen
#    turn_off_action:
#      then:
#        cover.stop: rolladen
      
######FÜR KIPP/SCHALTER#####
    on_turn_on:
      then:
        cover.open: rolladen
    on_turn_off:
      then:
        cover.stop: rolladen

  - platform: template
    name: "Move DOWN"
    optimistic: true
    internal: true
    lambda: |-
      if (id(switch1).state && !id(block_control).state) {
        return true;
      } else {
        return false;
      }
######FÜR TASTER######
#    turn_on_action:
#      then:
#        cover.close: rolladen
#    turn_off_action:
#      then:
#        cover.stop: rolladen

######FÜR KIPP/SCHALTER#####  
    on_turn_on:
      then:
        cover.close: rolladen
    on_turn_off:
      then:
        cover.stop: rolladen


binary_sensor:
  - platform: gpio
    pin: GPIO13
    name: "Switch #1"
    internal: true
    id: switch1
######FÜR 2TASTER######
#    on_press:
#      then:
#        - switch.toggle: relay1
        
######FÜR 1TASTER######
#    on_press:
#      then:
      # logic for cycling through movements: open->stop->close->stop->...
#      - lambda: |
#          if (id(rolladen).current_operation == COVER_OPERATION_IDLE) {
#            // Cover is idle, check current state and either open or close cover.
#            if (id(rolladen).is_fully_closed()) {
#              id(rolladen).open();
#            } else {
#              id(rolladen).close();
#            }
#          } else {
#            // Cover is opening/closing. Stop it.
#            id(rolladen).stop();
#          }
          
######FÜR TASTER/KIPP/SCHALTER#####
    on_press:
      then:
       - cover.open: rolladen
   

  - platform: gpio
    pin: GPIO5
    name: "Switch #2"
    internal: true
    id: switch2
######FÜR 2TASTER######
#    on_press:
#      then:
#        - switch.toggle: relay2
        
######FÜR 1TASTER######
#    on_press:
#      then:
      # logic for cycling through movements: open->stop->close->stop->...
#      - lambda: |
#          if (id(rolladen).current_operation == COVER_OPERATION_IDLE) {
#            // Cover is idle, check current state and either open or close cover.
#            if (id(rolladen).is_fully_closed()) {
#              id(rolladen).open();
#            } else {
#              id(rolladen).close();
#            }
#          } else {
#            // Cover is opening/closing. Stop it.
#            id(rolladen).stop();
#          }
          
######FÜR TASTER/KIPP/SCHALTER#####
    on_press:
      then:
       - cover.close: rolladen 
    
    
  - platform: gpio
    pin: GPIO16
    name: "ade7953 IRQ pin"
    internal: true

cover:
  - platform: time_based
    name: "rollo_og_frida_sued_210"
    id: rolladen

    open_action:
      - switch.turn_on: relay2
    open_duration: 20s

    close_action:
      - switch.turn_on: relay1
    close_duration: 19s

    stop_action:
      - switch.turn_off: relay1
      - switch.turn_off: relay2

i2c:
  sda: GPIO12
  scl: GPIO14
  
sensor:
  - platform: ade7953
    irq_pin: GPIO16
    voltage:
      name: ADE7953 Voltage
    current_a:
      name: ADE7953 Current A
    current_b:
      name: ADE7953 Current B
    active_power_a:
      name: ADE7953 Active Power A
    active_power_b:
      name: ADE7953 Active Power B
    update_interval: 3s

  - platform: ntc
    sensor: temp_resistance_reading
    name: "Rollo Temperature"
    calibration:
      b_constant: 3350
      reference_resistance: 10kOhm
      reference_temperature: 298.15K

  - platform: resistance
    id: temp_resistance_reading
    sensor: temp_analog_reading
    configuration: DOWNSTREAM
    resistor: 32kOhm

  - platform: adc
    id: temp_analog_reading
    pin: A0
    
  - platform: wifi_signal
    name: "Rollo WiFi Signal"
    update_interval: 60s
    
    
    

And here is the code of a 100% working Shelly in the next room:

esphome:
  name: rollo-og-linus-sued-211
  platform: ESP8266
  board: esp01_1m

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
  power_save_mode: none
  fast_connect: true
  output_power: 20dB
#  manual_ip:
#   static_ip: 192.168.1.201
#   gateway: 192.168.1.1
#   subnet: 255.255.255.0

  ap:
    ssid: "rollo_og_linus_sued_211"
    password: "XXXXXXXX"

captive_portal:

logger:

api:

ota:
  password: "XXXXXXXX"

switch:
  - platform: gpio
    pin: GPIO4
    name: "Relay #1"
    internal: true
    id: relay1
    interlock: &interlock_group [relay1, relay2]

  - platform: gpio
    pin: GPIO15
    name: "Relay #2"
    internal: true
    id: relay2
    interlock: *interlock_group

  - platform: template
    id: block_control
    name: " Rollo Block Control"
    optimistic: true

  - platform: template
    name: "Move UP"
    internal: true
    optimistic: true
    lambda: |-
      if (id(switch2).state && !id(block_control).state) {
        return true;
      } else {
        return false;
      }
######FÜR TASTER######
#    turn_on_action:
#      then:
#        cover.open: rolladen
#    turn_off_action:
#      then:
#        cover.stop: rolladen
      
######FÜR KIPP/SCHALTER#####
    on_turn_on:
      then:
        cover.open: rolladen
    on_turn_off:
      then:
        cover.stop: rolladen

  - platform: template
    name: "Move DOWN"
    optimistic: true
    internal: true
    lambda: |-
      if (id(switch1).state && !id(block_control).state) {
        return true;
      } else {
        return false;
      }
######FÜR TASTER######
#    turn_on_action:
#      then:
#        cover.close: rolladen
#    turn_off_action:
#      then:
#        cover.stop: rolladen

######FÜR KIPP/SCHALTER#####  
    on_turn_on:
      then:
        cover.close: rolladen
    on_turn_off:
      then:
        cover.stop: rolladen


binary_sensor:
  - platform: gpio
    pin: GPIO13
    name: "Switch #1"
    internal: true
    id: switch1
######FÜR 2TASTER######
#    on_press:
#      then:
#        - switch.toggle: relay1
        
######FÜR 1TASTER######
#    on_press:
#      then:
      # logic for cycling through movements: open->stop->close->stop->...
#      - lambda: |
#          if (id(rolladen).current_operation == COVER_OPERATION_IDLE) {
#            // Cover is idle, check current state and either open or close cover.
#            if (id(rolladen).is_fully_closed()) {
#              id(rolladen).open();
#            } else {
#              id(rolladen).close();
#            }
#          } else {
#            // Cover is opening/closing. Stop it.
#            id(rolladen).stop();
#          }
          
######FÜR TASTER/KIPP/SCHALTER#####
    on_press:
      then:
       - cover.open: rolladen
   

  - platform: gpio
    pin: GPIO5
    name: "Switch #2"
    internal: true
    id: switch2
######FÜR 2TASTER######
#    on_press:
#      then:
#        - switch.toggle: relay2
        
######FÜR 1TASTER######
#    on_press:
#      then:
      # logic for cycling through movements: open->stop->close->stop->...
#      - lambda: |
#          if (id(rolladen).current_operation == COVER_OPERATION_IDLE) {
#            // Cover is idle, check current state and either open or close cover.
#            if (id(rolladen).is_fully_closed()) {
#              id(rolladen).open();
#            } else {
#              id(rolladen).close();
#            }
#          } else {
#            // Cover is opening/closing. Stop it.
#            id(rolladen).stop();
#          }
          
######FÜR TASTER/KIPP/SCHALTER#####
    on_press:
      then:
       - cover.close: rolladen 
    
    
  - platform: gpio
    pin: GPIO16
    name: "ade7953 IRQ pin"
    internal: true

cover:
  - platform: time_based
    name: "rollo_og_linus_sued_211"
    id: rolladen

    open_action:
      - switch.turn_on: relay2
    open_duration: 20s

    close_action:
      - switch.turn_on: relay1
    close_duration: 19s

    stop_action:
      - switch.turn_off: relay1
      - switch.turn_off: relay2

i2c:
  sda: GPIO12
  scl: GPIO14
  
sensor:
  - platform: ade7953
    irq_pin: GPIO16
    voltage:
      name: ADE7953 Voltage
    current_a:
      name: ADE7953 Current A
    current_b:
      name: ADE7953 Current B
    active_power_a:
      name: ADE7953 Active Power A
    active_power_b:
      name: ADE7953 Active Power B
    update_interval: 3s

  - platform: ntc
    sensor: temp_resistance_reading
    name: "Rollo Temperature"
    calibration:
      b_constant: 3350
      reference_resistance: 10kOhm
      reference_temperature: 298.15K

  - platform: resistance
    id: temp_resistance_reading
    sensor: temp_analog_reading
    configuration: DOWNSTREAM
    resistor: 32kOhm

  - platform: adc
    id: temp_analog_reading
    pin: A0
    
  - platform: wifi_signal
    name: "Rollo WiFi Signal"
    update_interval: 60s

Thanks again for your help.

David

I could be wrong, but i think that you shouldn’t have the same id (rolladen) in cover section for two different shutters. You have set a different name, but you left the same cover ID… try to change that.

Hi,
thanks for your answer.
No, i think that is not the Problem. As I mentioned, I have 18 shelly 2.5 with the same ESPHome coding.
And the id “rolladen” (german for roller shutter) is everywhere the same.
i already made a diff between the codings of the shellys and the only difference is

  1. The name in line 2
  2. the ssid of the ap in line 19
  3. the name of the cover in line 178

I also compared the coding of two working shellys. They have the exactly same differences.

It is confusing.

greetings
David

Hi there,

I figured it out now.
The Shelly was shown with 2 devices and one of the devices has just one entity (the wifi signal).
It seems that I used this one in the automation. Now i used the other one and now everything works fine. I have no idea why there are two devices. I deactivated the useless one.
image

THX @all for your help.

btw: does anyone know how to delete the useless second device?

Thanks

David

Remove both devices and then re-add them. In esphome select device, click on three dots and “remove”.