# ESPHome Firmware # ESP32-PoE Main-Hub — Peak Control / Jan Kocoń # Hardware: ESP32dev, Ethernet LAN8720, 2x PCA9685, 3x MCP23017 IN, 3x MCP23017 OUT # Description: # Centralny hub oświetlenia dla całego domu. Steruje lokalnie 26 wyjściami (przekaźniki/MCP) # oraz 9 kanałami LED (PCA9685 cwww/rgbww/mono). 48 wejść fizycznych z logiką on_multi_click. # Zewnętrzne encje (WLED, wentylatory) sterowane przez homeassistant.service. # # Wymagane wpisy w secrets.yaml: # api_key: "<32-byte-base64>" # ota_key: "" # web_password: "" # # Adresy I2C: # 0x20 mcp23xxx_hub1_IN | 0x21 mcp23xxx_hub1_OUT # 0x22 mcp23xxx_hub2_IN | 0x23 mcp23xxx_hub2_OUT # 0x24 mcp23xxx_hub3_IN | 0x25 mcp23xxx_hub3_OUT # 0x40 pca9685_hub1 | 0x41 pca9685_hub2 # # Statyczne IP: 10.10.0.5 Gateway: 10.10.0.1 substitutions: device_name: "main-hub" friendly_name: "Main Hub" device_make: "Peak Control - Jan Kocoń" device_model: "ESP32-PoE Main-Hub" project_version: "1.1" log_level: "WARN" static_ip: "10.10.0.5" gateway: "10.10.0.1" subnet: "255.255.255.0" esphome: name: "${device_name}" friendly_name: "${friendly_name}" comment: "${device_model} by ${device_make}" name_add_mac_suffix: false min_version: "2024.6.0" project: name: "${device_make}.${device_model}" version: "${project_version}" on_boot: priority: -100 then: - light.turn_on: id: status_led red: 0% green: 0% blue: 100% brightness: 100% effect: "Slow Pulse" esp32: board: esp32dev variant: esp32 framework: type: esp-idf version: recommended sdkconfig_options: CONFIG_ESP32_REV_MIN_FULL: "300" # Enable logging logger: level: "${log_level}" # Enable Home Assistant API api: encryption: key: !secret api_key on_client_connected: - light.turn_on: id: status_led red: 0% green: 100% blue: 0% brightness: 50% on_client_disconnected: - light.turn_on: id: status_led red: 100% green: 0% blue: 0% brightness: 100% effect: "Slow Pulse" ota: - platform: esphome password: !secret ota_key - platform: web_server #wifi: # ssid: !secret wifi_ssid # password: !secret wifi_password # # # Enable fallback hotspot (captive portal) in case wifi connection fails # ap: # ssid: "Main-Hub Fallback Hotspot" # password: "y0LGSOyT5tjJ" #captive_portal: web_server: port: 80 auth: username: admin password: !secret web_password ethernet: type: LAN8720 mdc_pin: GPIO23 mdio_pin: GPIO18 clk: mode: CLK_OUT pin: 17 phy_addr: 0 power_pin: GPIO12 manual_ip: static_ip: "${static_ip}" gateway: "${gateway}" subnet: "${subnet}" button: - platform: restart name: '${friendly_name} Restart' i2c: sda: 13 scl: 16 scan: True frequency: 200kHz pca9685: - frequency: 1500 address: 0x40 id: "pca9685_hub1" - frequency: 1500 address: 0x41 id: "pca9685_hub2" mcp23017: - id: "mcp23xxx_hub1_IN" address: 0x20 - id: "mcp23xxx_hub1_OUT" address: 0x21 - id: "mcp23xxx_hub2_IN" address: 0x22 - id: "mcp23xxx_hub2_OUT" address: 0x23 - id: "mcp23xxx_hub3_IN" address: 0x24 - id: "mcp23xxx_hub3_OUT" address: 0x25 output: - platform: ledc id: output_blue pin: 5 - platform: ledc id: output_green pin: 14 - platform: ledc id: output_red pin: 15 #deklaracja LED - platform: pca9685 id: 'PWM1_1_Hub1' pca9685_id: 'pca9685_hub1' channel: 0 max_power: 100% - platform: pca9685 id: 'PWM1_2_Hub1' pca9685_id: 'pca9685_hub1' channel: 1 max_power: 100% - platform: pca9685 id: 'PWM2_1_Hub1' pca9685_id: 'pca9685_hub1' channel: 2 max_power: 100% - platform: pca9685 id: 'PWM2_2_Hub1' pca9685_id: 'pca9685_hub1' channel: 3 max_power: 100% - platform: pca9685 id: 'PWM3_1_Hub1' pca9685_id: 'pca9685_hub1' channel: 4 max_power: 100% - platform: pca9685 id: 'PWM3_2_Hub1' pca9685_id: 'pca9685_hub1' channel: 8 max_power: 100% - platform: pca9685 id: 'PWM4_1_Hub1' pca9685_id: 'pca9685_hub1' channel: 6 min_power: 0% max_power: 100% - platform: pca9685 id: 'PWM4_2_Hub1' pca9685_id: 'pca9685_hub1' channel: 7 min_power: 0% max_power: 100% - platform: pca9685 id: 'PWM5_1_Hub1' pca9685_id: 'pca9685_hub1' channel: 12 max_power: 100% - platform: pca9685 id: 'PWM5_2_Hub1' pca9685_id: 'pca9685_hub1' channel: 13 max_power: 100% - platform: pca9685 id: 'PWM1_1_Hub2' pca9685_id: 'pca9685_hub2' channel: 0 max_power: 100% - platform: pca9685 id: 'PWM1_2_Hub2' pca9685_id: 'pca9685_hub2' channel: 1 max_power: 100% - platform: pca9685 id: 'PWM2_1_Hub2' pca9685_id: 'pca9685_hub2' channel: 2 max_power: 100% - platform: pca9685 id: 'PWM2_2_Hub2' pca9685_id: 'pca9685_hub2' channel: 3 max_power: 100% - platform: pca9685 id: 'PWM3_1_Hub2' pca9685_id: 'pca9685_hub2' channel: 4 max_power: 100% - platform: pca9685 id: 'PWM3_2_Hub2' pca9685_id: 'pca9685_hub2' channel: 5 max_power: 95% - platform: pca9685 id: 'PWM4_1_Hub2' pca9685_id: 'pca9685_hub2' channel: 10 max_power: 100% - platform: pca9685 id: 'PWM4_2_Hub2' pca9685_id: 'pca9685_hub2' channel: 13 max_power: 100% - platform: pca9685 id: 'PWM5_1_Hub2' pca9685_id: 'pca9685_hub2' channel: 11 max_power: 100% - platform: pca9685 id: 'PWM5_2_Hub2' pca9685_id: 'pca9685_hub2' channel: 15 max_power: 100% light: - platform: rgb name: "Status LED" id: status_led red: output_red green: output_green blue: output_blue effects: - pulse: name: "Fast Pulse" transition_length: 0.5s update_interval: 0.5s - pulse: name: "Slow Pulse" transition_length: 1s update_interval: 1s - random: name: "Random Effect" transition_length: 1s update_interval: 2s #LEDY przez PCSA9685 - platform: cwww name: "Serwer LED" id: serwer_led cold_white: PWM2_1_Hub1 warm_white: PWM2_2_Hub1 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K default_transition_length: 2.0s - platform: cwww name: "Jadalnia LED" id: jadalnia_led cold_white: PWM4_2_Hub1 warm_white: PWM4_1_Hub1 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K default_transition_length: 2.0s - platform: cwww name: "Biała Łazienka wanna LED" id: biala_lazienka_wanna_led cold_white: PWM5_2_Hub1 warm_white: PWM5_1_Hub1 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K default_transition_length: 2.0s - platform: monochromatic name: "Kuchnia Łezka LED" id: kuchnia_lezka_led output: PWM2_1_Hub2 default_transition_length: 2.0s - platform: cwww name: "SPA Ledy" id: "SPA_Ledy" cold_white: PWM5_2_Hub2 warm_white: PWM5_1_Hub2 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K default_transition_length: 2.0s - platform: cwww name: "Pokój dla gości LED" id: pokoj_dla_gosci_led cold_white: PWM3_2_Hub2 warm_white: PWM4_1_Hub2 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K default_transition_length: 2.0s - platform: monochromatic name: "TEST LED 1" output: PWM1_2_Hub2 - platform: monochromatic name: "TEST LED 2" id: test_led_2 output: PWM3_1_Hub2 - platform: rgbww name: "Sypialnia LED" id: sypialnia_led red: PWM1_1_Hub1 green: PWM1_2_Hub1 blue: PWM3_1_Hub1 cold_white: PWM3_2_Hub1 warm_white: PWM1_1_Hub2 cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K color_interlock: false default_transition_length: 2.0s time: - platform: homeassistant timezone: Europe/Warsaw id: ha_time esp32_ble_tracker: switch: #mcp23xxx_hub1_OUT - platform: gpio name: "hub1_out0" # (wolne) pin: mcp23xxx: mcp23xxx_hub1_OUT number: 0 mode: OUTPUT inverted: False id: hub1_out0 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out1" # SPA Kinkiet Lustro pin: mcp23xxx: mcp23xxx_hub1_OUT number: 1 mode: OUTPUT inverted: False id: hub1_out1 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out2" # Biuro pin: mcp23xxx: mcp23xxx_hub1_OUT number: 2 mode: OUTPUT inverted: False id: hub1_out2 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out3" # Kuchnia Halogen pin: mcp23xxx: mcp23xxx_hub1_OUT number: 3 mode: OUTPUT inverted: False id: hub1_out3 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out4" # SPA Wentylator [FAN] pin: mcp23xxx: mcp23xxx_hub1_OUT number: 4 mode: OUTPUT inverted: False id: hub1_out4 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out5" # Kanciapa pod schodami pin: mcp23xxx: mcp23xxx_hub1_OUT number: 5 mode: OUTPUT inverted: False id: hub1_out5 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out6" # (wolne) pin: mcp23xxx: mcp23xxx_hub1_OUT number: 6 mode: OUTPUT inverted: False id: hub1_out6 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out7" # Garderoba Duża pin: mcp23xxx: mcp23xxx_hub1_OUT number: 7 mode: OUTPUT inverted: False id: hub1_out7 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out8" # Jadalnia pin: mcp23xxx: mcp23xxx_hub1_OUT number: 8 mode: OUTPUT inverted: False id: hub1_out8 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out9" # WC Lustro pin: mcp23xxx: mcp23xxx_hub1_OUT number: 9 mode: OUTPUT inverted: False id: hub1_out9 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out10" # SPA Halogeny pin: mcp23xxx: mcp23xxx_hub1_OUT number: 10 mode: OUTPUT inverted: False id: hub1_out10 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out11" # (wolne) pin: mcp23xxx: mcp23xxx_hub1_OUT number: 11 mode: OUTPUT inverted: False id: hub1_out11 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out12" # (wolne) pin: mcp23xxx: mcp23xxx_hub1_OUT number: 12 mode: OUTPUT inverted: False id: hub1_out12 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out13" # Mały Korytarz Kinkiet pin: mcp23xxx: mcp23xxx_hub1_OUT number: 13 mode: OUTPUT inverted: False id: hub1_out13 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out14" # Korytarz Halogeny pin: mcp23xxx: mcp23xxx_hub1_OUT number: 14 mode: OUTPUT inverted: False id: hub1_out14 restore_mode: ALWAYS_OFF - platform: gpio name: "hub1_out15" # Wejście Halogeny pin: mcp23xxx: mcp23xxx_hub1_OUT number: 15 mode: OUTPUT inverted: False id: hub1_out15 restore_mode: ALWAYS_OFF #mcp23xxx_hub2_OUT - platform: gpio name: "hub2_out0" # Łazienka Sufit pin: mcp23xxx: mcp23xxx_hub2_OUT number: 0 mode: OUTPUT inverted: False id: hub2_out0 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out1" # Sypialnia Łóżko Prawa strona pin: mcp23xxx: mcp23xxx_hub2_OUT number: 1 mode: OUTPUT inverted: False id: hub2_out1 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out2" # WC Sufit pin: mcp23xxx: mcp23xxx_hub2_OUT number: 2 mode: OUTPUT inverted: False id: hub2_out2 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out3" # Mały Korytarz Sufit pin: mcp23xxx: mcp23xxx_hub2_OUT number: 3 mode: OUTPUT inverted: False id: hub2_out3 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out4" # Łazienka Skos pin: mcp23xxx: mcp23xxx_hub2_OUT number: 4 mode: OUTPUT inverted: False id: hub2_out4 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out5" # WC Wentylator [FAN] pin: mcp23xxx: mcp23xxx_hub2_OUT number: 5 mode: OUTPUT inverted: False id: hub2_out5 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out6" # (wolne) pin: mcp23xxx: mcp23xxx_hub2_OUT number: 6 mode: OUTPUT inverted: False id: hub2_out6 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out7" # Sypialnia Halogen pin: mcp23xxx: mcp23xxx_hub2_OUT number: 7 mode: OUTPUT inverted: False id: hub2_out7 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out8" # Łazienka Sufit (Biała Łazienka Wentylator) [FAN] pin: mcp23xxx: mcp23xxx_hub2_OUT number: 8 mode: OUTPUT inverted: False id: hub2_out8 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out9" # (wolne) pin: mcp23xxx: mcp23xxx_hub2_OUT number: 9 mode: OUTPUT inverted: False id: hub2_out9 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out10" # Pokój Gościnny Sufit pin: mcp23xxx: mcp23xxx_hub2_OUT number: 10 mode: OUTPUT inverted: False id: hub2_out10 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out11" # Salon Plafon pin: mcp23xxx: mcp23xxx_hub2_OUT number: 11 mode: OUTPUT inverted: False id: hub2_out11 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out12" # Sypialnia Łóżko Lewa strona pin: mcp23xxx: mcp23xxx_hub2_OUT number: 12 mode: OUTPUT inverted: False id: hub2_out12 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out13" # SPA Zwisy pin: mcp23xxx: mcp23xxx_hub2_OUT number: 13 mode: OUTPUT inverted: False id: hub2_out13 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out14" # Mała Garderoba pin: mcp23xxx: mcp23xxx_hub2_OUT number: 14 mode: OUTPUT inverted: False id: hub2_out14 restore_mode: ALWAYS_OFF - platform: gpio name: "hub2_out15" # (wolne) pin: mcp23xxx: mcp23xxx_hub2_OUT number: 15 mode: OUTPUT inverted: False id: hub2_out15 restore_mode: ALWAYS_OFF #mcp23xxx_hub3_OUT - platform: gpio name: "hub3_out0" # (wolne) pin: mcp23xxx: mcp23xxx_hub3_OUT number: 0 mode: OUTPUT inverted: False id: hub3_out0 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out1" # (wolne) pin: mcp23xxx: mcp23xxx_hub3_OUT number: 1 mode: OUTPUT inverted: False id: hub3_out1 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out2" # Wentylator Główny Obieg [FAN] pin: mcp23xxx: mcp23xxx_hub3_OUT number: 2 mode: OUTPUT inverted: False id: hub3_out2 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out3" # Ogrzewanie Kuchnia pin: mcp23xxx: mcp23xxx_hub3_OUT number: 3 mode: OUTPUT inverted: False id: hub3_out3 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out4" # Ogrzewanie Jadalnia/Salon pin: mcp23xxx: mcp23xxx_hub3_OUT number: 4 mode: OUTPUT inverted: False id: hub3_out4 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out5" # Ogrzewanie Salon kanapa pin: mcp23xxx: mcp23xxx_hub3_OUT number: 5 mode: OUTPUT inverted: False id: hub3_out5 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out6" # Ogrzewanie SPA pin: mcp23xxx: mcp23xxx_hub3_OUT number: 6 mode: OUTPUT inverted: False id: hub3_out6 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out7" # Ogrzewanie Korytarz pin: mcp23xxx: mcp23xxx_hub3_OUT number: 7 mode: OUTPUT inverted: False id: hub3_out7 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out8" # Ogrzewanie Pokój Dziecka 2 pin: mcp23xxx: mcp23xxx_hub3_OUT number: 8 mode: OUTPUT inverted: False id: hub3_out8 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out9" # Ogrzewanie Biuro/Serwer pin: mcp23xxx: mcp23xxx_hub3_OUT number: 9 mode: OUTPUT inverted: False id: hub3_out9 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out10" # Ogrzewanie Biuro pin: mcp23xxx: mcp23xxx_hub3_OUT number: 10 mode: OUTPUT inverted: False id: hub3_out10 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out11" # Ogrzewanie Pokój Dziecka 1 pin: mcp23xxx: mcp23xxx_hub3_OUT number: 11 mode: OUTPUT inverted: False id: hub3_out11 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out12" # Ogrzewanie Garderoba pin: mcp23xxx: mcp23xxx_hub3_OUT number: 12 mode: OUTPUT inverted: False id: hub3_out12 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out13" # Ogrzewanie Sypialnia 2 pin: mcp23xxx: mcp23xxx_hub3_OUT number: 13 mode: OUTPUT inverted: False id: hub3_out13 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out14" # Ogrzewanie Biała Łazienka/WC pin: mcp23xxx: mcp23xxx_hub3_OUT number: 14 mode: OUTPUT inverted: False id: hub3_out14 restore_mode: ALWAYS_OFF - platform: gpio name: "hub3_out15" # Ogrzewanie Sypialnia 1 pin: mcp23xxx: mcp23xxx_hub3_OUT number: 15 mode: OUTPUT inverted: False id: hub3_out15 restore_mode: ALWAYS_OFF text_sensor: - platform: ethernet_info ip_address: name: "IP Address" icon: "mdi:wan" entity_category: diagnostic - platform: template name: "Firmware Version" icon: "mdi:tag" entity_category: diagnostic lambda: return {"${project_version}"}; - platform: version name: "ESPHome Version" icon: "mdi:information-outline" entity_category: diagnostic hide_timestamp: true script: - id: off_all then: - switch.turn_off: hub1_out1 - switch.turn_off: hub1_out2 - switch.turn_off: hub1_out3 - switch.turn_off: hub1_out4 - switch.turn_off: hub1_out5 - switch.turn_off: hub1_out7 - switch.turn_off: hub1_out8 - switch.turn_off: hub1_out9 - switch.turn_off: hub1_out10 - switch.turn_off: hub1_out13 - switch.turn_off: hub1_out14 - switch.turn_off: hub1_out15 - switch.turn_off: hub2_out0 - switch.turn_off: hub2_out1 - switch.turn_off: hub2_out2 - switch.turn_off: hub2_out3 - switch.turn_off: hub2_out4 - switch.turn_off: hub2_out5 - switch.turn_off: hub2_out7 - switch.turn_off: hub2_out8 - switch.turn_off: hub2_out10 - switch.turn_off: hub2_out11 - switch.turn_off: hub2_out12 - switch.turn_off: hub2_out13 - switch.turn_off: hub2_out14 - switch.turn_off: hub3_out2 - light.turn_off: serwer_led - light.turn_off: jadalnia_led - light.turn_off: biala_lazienka_wanna_led - light.turn_off: kuchnia_lezka_led - light.turn_off: SPA_Ledy - light.turn_off: pokoj_dla_gosci_led - light.turn_off: sypialnia_led binary_sensor: - platform: status name: "Status" entity_category: diagnostic #Mains detector #- platform: gpio # pin: # number: 39 # inverted: True # name: "Mains detector" ################## #mcp23xxx_hub1_IN# ################## - platform: gpio name: "hub1_in0" # Wejście 1 pin: mcp23xxx: mcp23xxx_hub1_IN number: 0 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in0 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out15 # Wejście Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Wejście 1 [1×]" entity_id: "binary_sensor.hub1_in0" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Wejście 1 [długi]" entity_id: "binary_sensor.hub1_in0" - platform: gpio name: "hub1_in1" # Wejście 3 pin: mcp23xxx: mcp23xxx_hub1_IN number: 1 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in1 - platform: gpio name: "hub1_in2" # Wejście 2 pin: mcp23xxx: mcp23xxx_hub1_IN number: 2 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in2 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out14 # Korytarz Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Wejście 2 [1×]" entity_id: "binary_sensor.hub1_in2" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Wejście 2 [długi]" entity_id: "binary_sensor.hub1_in2" - platform: gpio name: "hub1_in3" # Sypialnia 3 pin: mcp23xxx: mcp23xxx_hub1_IN number: 3 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in3 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out12 # Sypialnia Łóżko Lewa strona - switch.toggle: hub2_out1 # Sypialnia Łóżko Prawa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia 3 [1×]" entity_id: "binary_sensor.hub1_in3" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out12 # Sypialnia Łóżko Lewa strona - switch.toggle: hub2_out1 # Sypialnia Łóżko Prawa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia 3 [2×]" entity_id: "binary_sensor.hub1_in3" - platform: gpio name: "hub1_in4" # Sypialnia 1 pin: mcp23xxx: mcp23xxx_hub1_IN number: 4 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in4 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: sypialnia_led # Sypialnia LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia 1 [1×]" entity_id: "binary_sensor.hub1_in4" - platform: gpio name: "hub1_in5" # Sypialnia 2 pin: mcp23xxx: mcp23xxx_hub1_IN number: 5 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in5 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out7 # Sypialnia Halogen - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia 2 [1×]" entity_id: "binary_sensor.hub1_in5" - platform: gpio name: "hub1_in6" # Sypialnia Łóżko Prawa Strona pin: mcp23xxx: mcp23xxx_hub1_IN number: 6 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in6 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out1 # Sypialnia Łóżko Prawa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Prawo [1×]" entity_id: "binary_sensor.hub1_in6" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out12 # Sypialnia Łóżko Lewa strona - switch.toggle: hub2_out1 # Sypialnia Łóżko Prawa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Prawo [2×]" entity_id: "binary_sensor.hub1_in6" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Prawo [długi]" entity_id: "binary_sensor.hub1_in6" - platform: gpio name: "hub1_in7" # Sypialnia Łóżko Lewa Strona pin: mcp23xxx: mcp23xxx_hub1_IN number: 7 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in7 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out12 # Sypialnia Łóżko Lewa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Lewo [1×]" entity_id: "binary_sensor.hub1_in7" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out12 # Sypialnia Łóżko Lewa strona - switch.toggle: hub2_out1 # Sypialnia Łóżko Prawa strona - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Lewo [2×]" entity_id: "binary_sensor.hub1_in7" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Sypialnia Łóżko Lewo [długi]" entity_id: "binary_sensor.hub1_in7" - platform: gpio name: "hub1_in8" # Pokój dla Gości Lewy pin: mcp23xxx: mcp23xxx_hub1_IN number: 8 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in8 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out10 # Pokój Gościnny Sufit - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Pokój Gości Lewy [1×]" entity_id: "binary_sensor.hub1_in8" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out7 # Garderoba Duża - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Pokój Gości Lewy [2×]" entity_id: "binary_sensor.hub1_in8" - platform: gpio name: "hub1_in9" # Pokój dla Gości Prawy pin: mcp23xxx: mcp23xxx_hub1_IN number: 9 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in9 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: pokoj_dla_gosci_led # Pokój dla Gości LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Pokój Gości Prawy [1×]" entity_id: "binary_sensor.hub1_in9" - platform: gpio name: "hub1_in10" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 10 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in10 - platform: gpio name: "hub1_in11" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 11 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in11 - platform: gpio name: "hub1_in12" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 12 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in12 - platform: gpio name: "hub1_in13" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 13 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in13 - platform: gpio name: "hub1_in14" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 14 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in14 - platform: gpio name: "hub1_in15" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub1_IN number: 15 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub1_in15 ################## #mcp23xxx_hub2_IN# ################## - platform: gpio name: "hub2_in0" # Korytarz 2 pin: mcp23xxx: mcp23xxx_hub2_IN number: 0 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in0 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out15 # Wejście Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Korytarz 2 [1×]" entity_id: "binary_sensor.hub2_in0" - platform: gpio name: "hub2_in1" # Korytarz 3 pin: mcp23xxx: mcp23xxx_hub2_IN number: 1 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in1 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.korytarz_kinkiety # Korytarz Kinkiety - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Korytarz 3 [1×]" entity_id: "binary_sensor.hub2_in1" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Korytarz 3 [długi]" entity_id: "binary_sensor.hub2_in1" - platform: gpio name: "hub2_in2" # Korytarz 1 pin: mcp23xxx: mcp23xxx_hub2_IN number: 2 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in2 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out14 # Korytarz Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Korytarz 1 [1×]" entity_id: "binary_sensor.hub2_in2" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Korytarz 1 [długi]" entity_id: "binary_sensor.hub2_in2" - platform: gpio name: "hub2_in3" # Mały Korytarz pin: mcp23xxx: mcp23xxx_hub2_IN number: 3 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in3 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out13 # Mały Korytarz Kinkiet - switch.toggle: hub2_out3 # Mały Korytarz Sufit - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Mały Korytarz [1×]" entity_id: "binary_sensor.hub2_in3" - platform: gpio name: "hub2_in4" # Garderoba Mała pin: mcp23xxx: mcp23xxx_hub2_IN number: 4 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in4 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out14 # Mała Garderoba - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Garderoba Mała [1×]" entity_id: "binary_sensor.hub2_in4" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub3_out2 # Wentylator Główny Obieg - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Garderoba Mała [2×]" entity_id: "binary_sensor.hub2_in4" - platform: gpio name: "hub2_in5" # Kuchnia 3_1 pin: mcp23xxx: mcp23xxx_hub2_IN number: 5 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in5 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out8 # Jadalnia - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 3_1 [1×]" entity_id: "binary_sensor.hub2_in5" - platform: gpio name: "hub2_in6" # Kuchnia 3_2 pin: mcp23xxx: mcp23xxx_hub2_IN number: 6 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in6 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: jadalnia_led # Jadalnia LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 3_2 [1×]" entity_id: "binary_sensor.hub2_in6" - platform: gpio name: "hub2_in7" # Kuchnia 2_1 pin: mcp23xxx: mcp23xxx_hub2_IN number: 7 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in7 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out3 # Kuchnia Halogen - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 2_1 [1×]" entity_id: "binary_sensor.hub2_in7" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 2_1 [długi]" entity_id: "binary_sensor.hub2_in7" - platform: gpio name: "hub2_in8" # Kuchnia 2_2 pin: mcp23xxx: mcp23xxx_hub2_IN number: 8 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in8 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: kuchnia_lezka_led # Kuchnia Łezka LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 2_2 [1×]" entity_id: "binary_sensor.hub2_in8" - platform: gpio name: "hub2_in9" # Kuchnia 1_1 pin: mcp23xxx: mcp23xxx_hub2_IN number: 9 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in9 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out11 # Salon Plafon - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 1_1 [1×]" entity_id: "binary_sensor.hub2_in9" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: switch.toggle data: entity_id: switch.salon_wentylator # Salon Wentylator - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 1_1 [2×]" entity_id: "binary_sensor.hub2_in9" - platform: gpio name: "hub2_in10" # Kuchnia 1_2 pin: mcp23xxx: mcp23xxx_hub2_IN number: 10 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in10 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.komin_led # Komin LED - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiety_led # Salon Kinkiety LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 1_2 [1×]" entity_id: "binary_sensor.hub2_in10" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.komin_led # Komin LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 1_2 [2×]" entity_id: "binary_sensor.hub2_in10" - timing: - ON for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.komin_led # Komin LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Kuchnia Filar 1_2 [długi]" entity_id: "binary_sensor.hub2_in10" - platform: gpio name: "hub2_in11" # Schody 3 pin: mcp23xxx: mcp23xxx_hub2_IN number: 11 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in11 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.oczka_taras_2 # Oczka Taras - homeassistant.service: service: light.toggle data: entity_id: light.skrzynia_2 # Skrzynia - homeassistant.service: service: light.toggle data: entity_id: light.tunel_2 # Tunel - homeassistant.service: service: light.toggle data: entity_id: light.zwis_schody_2 # Zwis Schody - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Schody 3 [1×]" entity_id: "binary_sensor.hub2_in11" - platform: gpio name: "hub2_in12" # Schody 1 pin: mcp23xxx: mcp23xxx_hub2_IN number: 12 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in12 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out11 # Salon Plafon - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Schody 1 [1×]" entity_id: "binary_sensor.hub2_in12" - platform: gpio name: "hub2_in13" # Schody 2 pin: mcp23xxx: mcp23xxx_hub2_IN number: 13 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in13 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_1_led # Salon Kinkiet 1 - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_2_led # Salon Kinkiet 2 - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_3_led # Salon Kinkiet 3 - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Schody 2 [1×]" entity_id: "binary_sensor.hub2_in13" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiety_led # Salon Kinkiety LED (grupa) - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_1_led # Salon Kinkiet 1 - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_2_led # Salon Kinkiet 2 - homeassistant.service: service: light.toggle data: entity_id: light.salon_kinkiet_3_led # Salon Kinkiet 3 - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Schody 2 [2×]" entity_id: "binary_sensor.hub2_in13" - timing: - ON for at least 350ms then: - homeassistant.service: service: light.toggle data: entity_id: light.komin_led # Komin LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Schody 2 [długi]" entity_id: "binary_sensor.hub2_in13" - platform: gpio name: "hub2_in14" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub2_IN number: 14 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in14 - platform: gpio name: "hub2_in15" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub2_IN number: 15 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub2_in15 ################## #mcp23xxx_hub3_IN# ################## - platform: gpio name: "hub3_in0" # Garderoba Duża Lewy pin: mcp23xxx: mcp23xxx_hub3_IN number: 0 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in0 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out7 # Garderoba Duża - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Garderoba Duża Lewy [1×]" entity_id: "binary_sensor.hub3_in0" - platform: gpio name: "hub3_in1" # Garderoba Duża Prawy pin: mcp23xxx: mcp23xxx_hub3_IN number: 1 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in1 - platform: gpio name: "hub3_in2" # SPA Lewy pin: mcp23xxx: mcp23xxx_hub3_IN number: 2 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in2 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out13 # SPA Zwisy - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Lewy [1×]" entity_id: "binary_sensor.hub3_in2" - timing: - ON for at least 350ms then: - switch.toggle: hub1_out4 # SPA Wentylator - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Lewy [długi]" entity_id: "binary_sensor.hub3_in2" - platform: gpio name: "hub3_in3" # SPA Prawy pin: mcp23xxx: mcp23xxx_hub3_IN number: 3 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in3 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out4 # SPA Wentylator - switch.toggle: hub1_out10 # SPA Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Prawy [1×]" entity_id: "binary_sensor.hub3_in3" - timing: - ON for at least 350ms then: - light.toggle: SPA_Ledy # SPA Ledy - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Prawy [długi]" entity_id: "binary_sensor.hub3_in3" - platform: gpio name: "hub3_in4" # Biała Łazienka Ściana pin: mcp23xxx: mcp23xxx_hub3_IN number: 4 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in4 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out0 # Łazienka Sufit - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biała Łazienka [1×]" entity_id: "binary_sensor.hub3_in4" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: biala_lazienka_wanna_led # Biała Łazienka Wanna LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biała Łazienka [2×]" entity_id: "binary_sensor.hub3_in4" - timing: - ON for at least 350ms then: - switch.toggle: hub2_out8 # Łazienka Wentylator - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biała Łazienka [długi]" entity_id: "binary_sensor.hub3_in4" - platform: gpio name: "hub3_in5" # Małe WC Lustro Prawy pin: mcp23xxx: mcp23xxx_hub3_IN number: 5 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in5 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out5 # WC Wentylator - switch.toggle: hub2_out2 # WC Sufit - homeassistant.service: service: light.toggle data: entity_id: light.wc_led # WC LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "WC Prawy [1×]" entity_id: "binary_sensor.hub3_in5" - platform: gpio name: "hub3_in6" # Małe WC Lustro Lewy pin: mcp23xxx: mcp23xxx_hub3_IN number: 6 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in6 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out9 # WC Lustro - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "WC Lewy [1×]" entity_id: "binary_sensor.hub3_in6" - platform: gpio name: "hub3_in7" # Biała Łazienka Skos pin: mcp23xxx: mcp23xxx_hub3_IN number: 7 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in7 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub2_out4 # Łazienka Skos - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biała Łazienka Skos [1×]" entity_id: "binary_sensor.hub3_in7" - platform: gpio name: "hub3_in8" # SPA Lustro Lewy pin: mcp23xxx: mcp23xxx_hub3_IN number: 8 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in8 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out5 # Kanciapa pod schodami - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Lustro Lewy [1×]" entity_id: "binary_sensor.hub3_in8" - platform: gpio name: "hub3_in9" # SPA Lustro Prawy pin: mcp23xxx: mcp23xxx_hub3_IN number: 9 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in9 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out1 # SPA Kinkiet Lustro - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "SPA Lustro Prawy [1×]" entity_id: "binary_sensor.hub3_in9" - platform: gpio name: "hub3_in10" # Biuro Skos pin: mcp23xxx: mcp23xxx_hub3_IN number: 10 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in10 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out2 # Biuro - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biuro Skos [1×]" entity_id: "binary_sensor.hub3_in10" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: serwer_led # Serwer LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Biuro Skos [2×]" entity_id: "binary_sensor.hub3_in10" - platform: gpio name: "hub3_in11" # Serwer Prawy pin: mcp23xxx: mcp23xxx_hub3_IN number: 11 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in11 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: serwer_led # Serwer LED - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Prawy [1×]" entity_id: "binary_sensor.hub3_in11" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - light.toggle: test_led_2 # TEST LED 2 - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Prawy [2×]" entity_id: "binary_sensor.hub3_in11" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub3_out2 # Wentylator Główny Obieg - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Prawy [3×]" entity_id: "binary_sensor.hub3_in11" - platform: gpio name: "hub3_in12" # Serwer Lewy pin: mcp23xxx: mcp23xxx_hub3_IN number: 12 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in12 on_multi_click: - timing: - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out14 # Korytarz Halogeny - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Lewy [1×]" entity_id: "binary_sensor.hub3_in12" - timing: - ON for at most 350ms - OFF for at most 350ms - ON for at most 350ms - OFF for at least 350ms then: - switch.toggle: hub1_out14 # Korytarz Halogeny - switch.toggle: hub1_out2 # Biuro - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Lewy [2×]" entity_id: "binary_sensor.hub3_in12" - timing: - ON for at least 350ms then: - script.execute: off_all - homeassistant.service: service: logbook.log data: name: "Main Hub" message: "Serwer Lewy [długi]" entity_id: "binary_sensor.hub3_in12" - platform: gpio name: "hub3_in13" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub3_IN number: 13 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in13 - platform: gpio name: "hub3_in14" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub3_IN number: 14 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in14 - platform: gpio name: "hub3_in15" # (niepodpięte) pin: mcp23xxx: mcp23xxx_hub3_IN number: 15 mode: INPUT inverted: True filters: - delayed_on_off: 50ms id: hub3_in15 sensor: - platform: uptime type: seconds name: "Uptime" icon: "mdi:clock-outline" entity_category: diagnostic update_interval: 300s - platform: atc_mithermometer mac_address: "A4:C1:38:C5:11:58" temperature: name: "Biuro Temperatura" humidity: name: "Biuro Nawilżenie" battery_level: name: "Biuro Bateria" - platform: atc_mithermometer mac_address: "A4:C1:38:5C:4F:38" temperature: name: "Serwer Temperatura" humidity: name: "Serwer Nawilżenie" battery_level: name: "Serwer Bateria" - platform: atc_mithermometer mac_address: "A4:C1:38:67:6B:94" temperature: name: "Kuchnia Temperatura" humidity: name: "Kuchnia Nawilżenie" battery_level: name: "Kuchnia Bateria" - platform: atc_mithermometer mac_address: "A4:C1:38:C9:FE:CA" temperature: name: "WC Temperatura" humidity: name: "WC Nawilżenie" battery_level: name: "WC Bateria" - platform: atc_mithermometer mac_address: "A4:C1:38:63:6D:DB" temperature: name: "Łazienka Temperatura" humidity: name: "Łazienka Nawilżenie" battery_level: name: "Łazienka Bateria"