NSPANEL Blackymas how to invert relays

Hi, I am using the Blackymas for NSPANEL all worked like a charm but I need to invert the relays logic to control my heater with a pilot wire with a diode.

Where should I make this inversion? I guess the best way to to it could be at the lowest level in ESPHOME

this is my current ESPHOME config:

substitutions:
  ###### CHANGE ME START ######
  device_name: "nspanel" 
  wifi_ssid: "ccccc"
  wifi_password: "cccccc"

  #nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
  nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_eu.tft"
  
  ##### addon-configuration #####
  ## addon_climate ##
  # addon_climate_heater_relay: "1" # possible values: 1/2

  ##### CHANGE ME END #####

packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      # - nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
      # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
      # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
    refresh: 300s

##### My customization - Start #####
##### My customization - End #####

thanks

As you can no doubt see, your yaml does not refer to relays. You may need to clone the Blackymas yaml from Github and modify the relays in there, however maybe you should be asking the author of Blackymas rather than ESPHome users.

1 Like

thanks for your suggestion

it is there (i took out the included url and hardcopied it in my yaml)

look for:

  ###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
  - name: ${node_name} Left Button
    platform: gpio
    id: left_button
    pin:
      number: 14
      inverted: true
    on_click:
      then:
        - if:
            condition:
              and:
                - switch.is_on: relay1_fallback
                - not:
                    api.connected:
            then:
              - switch.toggle: relay_1
              - if:
                  condition:
                    switch.is_on: relay_1
                  then:
                    - lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
                    - lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
                  else:
                    - lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
                    - lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");

the right button is just below