Wiki source code of Configurazioni varie
Last modified by Micky Grillo on 2023/02/24 00:36
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
1.1 | 1 | {{code}} |
| 2 | esphome: | ||
| 3 | name: kc868-e16s-1 | ||
| 4 | #limita uso risorse per device con poca ram | ||
| 5 | compile_process_limit: 1 | ||
| 6 | |||
| 7 | esp32: | ||
| 8 | board: esp32dev | ||
| 9 | framework: | ||
| 10 | type: arduino | ||
| 11 | version: 2.0.6 | ||
| 12 | |||
| 13 | # Enable logging | ||
| 14 | logger: | ||
| 15 | |||
| 16 | # Enable Home Assistant API | ||
| 17 | api: | ||
| 18 | encryption: | ||
| 19 | key: !secret encryption_key | ||
| 20 | |||
| 21 | ota: | ||
| 22 | password: !secret ota | ||
| 23 | |||
| 24 | ethernet: | ||
| 25 | domain: ".snoopy.lan" | ||
| 26 | type: LAN8720 | ||
| 27 | mdc_pin: GPIO23 | ||
| 28 | mdio_pin: GPIO18 | ||
| 29 | clk_mode: GPIO17_OUT | ||
| 30 | phy_addr: 0 | ||
| 31 | |||
| 32 | # IP statico | ||
| 33 | manual_ip: | ||
| 34 | static_ip: 192.168.82.201 | ||
| 35 | gateway: 192.168.82.1 | ||
| 36 | subnet: 255.255.255.0 | ||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | # Abilita Bluetooth | ||
| 41 | #esp32_ble_tracker: | ||
| 42 | #bluetooth_proxy: | ||
| 43 | |||
| 44 | # Enable Web server (optional). | ||
| 45 | web_server: | ||
| 46 | port: 80 | ||
| 47 | auth: | ||
| 48 | username: !secret web_username | ||
| 49 | password: !secret web_password | ||
| 50 | |||
| 51 | # Enable i2c | ||
| 52 | i2c: | ||
| 53 | sda: 16 | ||
| 54 | scl: 15 | ||
| 55 | scan: true | ||
| 56 | id: bus_a | ||
| 57 | |||
| 58 | sensor: | ||
| 59 | - platform: uptime | ||
| 60 | name: ${device_name} Uptime | ||
| 61 | - platform: adc | ||
| 62 | pin: GPIO36 | ||
| 63 | name: "test1" | ||
| 64 | update_interval: 10s | ||
| 65 | |||
| 66 | text_sensor: | ||
| 67 | # Text sensors with general information. | ||
| 68 | # Expose ESPHome version as sensor. | ||
| 69 | - platform: version | ||
| 70 | name: ${device_name} ESPHome Version | ||
| 71 | # Riporta IP del device | ||
| 72 | - platform: ethernet_info | ||
| 73 | ip_address: | ||
| 74 | name: ${device_name} IP | ||
| 75 | |||
| 76 | - platform: template | ||
| 77 | id: e16s_input1_action | ||
| 78 | name: e16s_01_input1 Action | ||
| 79 | on_value: | ||
| 80 | - if: | ||
| 81 | condition: | ||
| 82 | text_sensor.state: | ||
| 83 | id: e16s_input1_action | ||
| 84 | state: "" | ||
| 85 | else: | ||
| 86 | - delay: 20ms | ||
| 87 | - text_sensor.template.publish: | ||
| 88 | id: e16s_input1_action | ||
| 89 | state: !lambda 'return "";' | ||
| 90 | |||
| 91 | - platform: template | ||
| 92 | id: e16s_input2_action | ||
| 93 | name: e16s_01_input2 Action | ||
| 94 | on_value: | ||
| 95 | - if: | ||
| 96 | condition: | ||
| 97 | text_sensor.state: | ||
| 98 | id: e16s_input2_action | ||
| 99 | state: "" | ||
| 100 | else: | ||
| 101 | - delay: 20ms | ||
| 102 | - text_sensor.template.publish: | ||
| 103 | id: e16s_input2_action | ||
| 104 | state: !lambda 'return "";' | ||
| 105 | |||
| 106 | - platform: template | ||
| 107 | id: e16s_input3_action | ||
| 108 | name: e16s_01_input3 Action | ||
| 109 | on_value: | ||
| 110 | - if: | ||
| 111 | condition: | ||
| 112 | text_sensor.state: | ||
| 113 | id: e16s_input3_action | ||
| 114 | state: "" | ||
| 115 | else: | ||
| 116 | - delay: 20ms | ||
| 117 | - text_sensor.template.publish: | ||
| 118 | id: e16s_input3_action | ||
| 119 | state: !lambda 'return "";' | ||
| 120 | |||
| 121 | - platform: template | ||
| 122 | id: e16s_input4_action | ||
| 123 | name: e16s_01_input4 Action | ||
| 124 | on_value: | ||
| 125 | - if: | ||
| 126 | condition: | ||
| 127 | text_sensor.state: | ||
| 128 | id: e16s_input4_action | ||
| 129 | state: "" | ||
| 130 | else: | ||
| 131 | - delay: 20ms | ||
| 132 | - text_sensor.template.publish: | ||
| 133 | id: e16s_input4_action | ||
| 134 | state: !lambda 'return "";' | ||
| 135 | |||
| 136 | - platform: template | ||
| 137 | id: e16s_input5_action | ||
| 138 | name: e16s_01_input5 Action | ||
| 139 | on_value: | ||
| 140 | - if: | ||
| 141 | condition: | ||
| 142 | text_sensor.state: | ||
| 143 | id: e16s_input5_action | ||
| 144 | state: "" | ||
| 145 | else: | ||
| 146 | - delay: 20ms | ||
| 147 | - text_sensor.template.publish: | ||
| 148 | id: e16s_input5_action | ||
| 149 | state: !lambda 'return "";' | ||
| 150 | |||
| 151 | - platform: template | ||
| 152 | id: e16s_input6_action | ||
| 153 | name: e16s_01_input6 Action | ||
| 154 | on_value: | ||
| 155 | - if: | ||
| 156 | condition: | ||
| 157 | text_sensor.state: | ||
| 158 | id: e16s_input6_action | ||
| 159 | state: "" | ||
| 160 | else: | ||
| 161 | - delay: 20ms | ||
| 162 | - text_sensor.template.publish: | ||
| 163 | id: e16s_input6_action | ||
| 164 | state: !lambda 'return "";' | ||
| 165 | |||
| 166 | - platform: template | ||
| 167 | id: e16s_input7_action | ||
| 168 | name: e16s_01_input7 Action | ||
| 169 | on_value: | ||
| 170 | - if: | ||
| 171 | condition: | ||
| 172 | text_sensor.state: | ||
| 173 | id: e16s_input7_action | ||
| 174 | state: "" | ||
| 175 | else: | ||
| 176 | - delay: 20ms | ||
| 177 | - text_sensor.template.publish: | ||
| 178 | id: e16s_input7_action | ||
| 179 | state: !lambda 'return "";' | ||
| 180 | |||
| 181 | - platform: template | ||
| 182 | id: e16s_input8_action | ||
| 183 | name: e16s_01_input8 Action | ||
| 184 | on_value: | ||
| 185 | - if: | ||
| 186 | condition: | ||
| 187 | text_sensor.state: | ||
| 188 | id: e16s_input8_action | ||
| 189 | state: "" | ||
| 190 | else: | ||
| 191 | - delay: 20ms | ||
| 192 | - text_sensor.template.publish: | ||
| 193 | id: e16s_input8_action | ||
| 194 | state: !lambda 'return "";' | ||
| 195 | |||
| 196 | - platform: template | ||
| 197 | id: e16s_input9_action | ||
| 198 | name: e16s_01_input9 Action | ||
| 199 | on_value: | ||
| 200 | - if: | ||
| 201 | condition: | ||
| 202 | text_sensor.state: | ||
| 203 | id: e16s_input9_action | ||
| 204 | state: "" | ||
| 205 | else: | ||
| 206 | - delay: 20ms | ||
| 207 | - text_sensor.template.publish: | ||
| 208 | id: e16s_input9_action | ||
| 209 | state: !lambda 'return "";' | ||
| 210 | |||
| 211 | - platform: template | ||
| 212 | id: e16s_input10_action | ||
| 213 | name: e16s_01_input10 Action | ||
| 214 | on_value: | ||
| 215 | - if: | ||
| 216 | condition: | ||
| 217 | text_sensor.state: | ||
| 218 | id: e16s_input10_action | ||
| 219 | state: "" | ||
| 220 | else: | ||
| 221 | - delay: 20ms | ||
| 222 | - text_sensor.template.publish: | ||
| 223 | id: e16s_input10_action | ||
| 224 | state: !lambda 'return "";' | ||
| 225 | |||
| 226 | - platform: template | ||
| 227 | id: e16s_input11_action | ||
| 228 | name: e16s_01_input11 Action | ||
| 229 | on_value: | ||
| 230 | - if: | ||
| 231 | condition: | ||
| 232 | text_sensor.state: | ||
| 233 | id: e16s_input11_action | ||
| 234 | state: "" | ||
| 235 | else: | ||
| 236 | - delay: 20ms | ||
| 237 | - text_sensor.template.publish: | ||
| 238 | id: e16s_input11_action | ||
| 239 | state: !lambda 'return "";' | ||
| 240 | |||
| 241 | - platform: template | ||
| 242 | id: e16s_input12_action | ||
| 243 | name: e16s_01_input12 Action | ||
| 244 | on_value: | ||
| 245 | - if: | ||
| 246 | condition: | ||
| 247 | text_sensor.state: | ||
| 248 | id: e16s_input12_action | ||
| 249 | state: "" | ||
| 250 | else: | ||
| 251 | - delay: 20ms | ||
| 252 | - text_sensor.template.publish: | ||
| 253 | id: e16s_input12_action | ||
| 254 | state: !lambda 'return "";' | ||
| 255 | |||
| 256 | - platform: template | ||
| 257 | id: e16s_input13_action | ||
| 258 | name: e16s_01_input13 Action | ||
| 259 | on_value: | ||
| 260 | - if: | ||
| 261 | condition: | ||
| 262 | text_sensor.state: | ||
| 263 | id: e16s_input13_action | ||
| 264 | state: "" | ||
| 265 | else: | ||
| 266 | - delay: 20ms | ||
| 267 | - text_sensor.template.publish: | ||
| 268 | id: e16s_input13_action | ||
| 269 | state: !lambda 'return "";' | ||
| 270 | |||
| 271 | - platform: template | ||
| 272 | id: e16s_input14_action | ||
| 273 | name: e16s_01_input14 Action | ||
| 274 | on_value: | ||
| 275 | - if: | ||
| 276 | condition: | ||
| 277 | text_sensor.state: | ||
| 278 | id: e16s_input14_action | ||
| 279 | state: "" | ||
| 280 | else: | ||
| 281 | - delay: 20ms | ||
| 282 | - text_sensor.template.publish: | ||
| 283 | id: e16s_input14_action | ||
| 284 | state: !lambda 'return "";' | ||
| 285 | |||
| 286 | - platform: template | ||
| 287 | id: e16s_input15_action | ||
| 288 | name: e16s_01_input15 Action | ||
| 289 | on_value: | ||
| 290 | - if: | ||
| 291 | condition: | ||
| 292 | text_sensor.state: | ||
| 293 | id: e16s_input15_action | ||
| 294 | state: "" | ||
| 295 | else: | ||
| 296 | - delay: 20ms | ||
| 297 | - text_sensor.template.publish: | ||
| 298 | id: e16s_input15_action | ||
| 299 | state: !lambda 'return "";' | ||
| 300 | |||
| 301 | - platform: template | ||
| 302 | id: e16s_input16_action | ||
| 303 | name: e16s_01_input16 Action | ||
| 304 | on_value: | ||
| 305 | - if: | ||
| 306 | condition: | ||
| 307 | text_sensor.state: | ||
| 308 | id: e16s_input16_action | ||
| 309 | state: "" | ||
| 310 | else: | ||
| 311 | - delay: 20ms | ||
| 312 | - text_sensor.template.publish: | ||
| 313 | id: e16s_input16_action | ||
| 314 | state: !lambda 'return "";' | ||
| 315 | |||
| 316 | - platform: template | ||
| 317 | id: A1_input_action | ||
| 318 | name: e16s_01_A1_input Action | ||
| 319 | on_value: | ||
| 320 | - if: | ||
| 321 | condition: | ||
| 322 | text_sensor.state: | ||
| 323 | id: A1_input_action | ||
| 324 | state: "" | ||
| 325 | else: | ||
| 326 | - delay: 20ms | ||
| 327 | - text_sensor.template.publish: | ||
| 328 | id: A1_input_action | ||
| 329 | state: !lambda 'return "";' | ||
| 330 | |||
| 331 | - platform: template | ||
| 332 | id: A2_input_action | ||
| 333 | name: e16s_01_A2_input Action | ||
| 334 | on_value: | ||
| 335 | - if: | ||
| 336 | condition: | ||
| 337 | text_sensor.state: | ||
| 338 | id: A2_input_action | ||
| 339 | state: "" | ||
| 340 | else: | ||
| 341 | - delay: 20ms | ||
| 342 | - text_sensor.template.publish: | ||
| 343 | id: A2_input_action | ||
| 344 | state: !lambda 'return "";' | ||
| 345 | |||
| 346 | - platform: template | ||
| 347 | id: A3_input_action | ||
| 348 | name: e16s_01_A3_input Action | ||
| 349 | on_value: | ||
| 350 | - if: | ||
| 351 | condition: | ||
| 352 | text_sensor.state: | ||
| 353 | id: A3_input_action | ||
| 354 | state: "" | ||
| 355 | else: | ||
| 356 | - delay: 20ms | ||
| 357 | - text_sensor.template.publish: | ||
| 358 | id: A3_input_action | ||
| 359 | state: !lambda 'return "";' | ||
| 360 | |||
| 361 | - platform: template | ||
| 362 | id: A4_input_action | ||
| 363 | name: e16s_01_A4_input Action | ||
| 364 | on_value: | ||
| 365 | - if: | ||
| 366 | condition: | ||
| 367 | text_sensor.state: | ||
| 368 | id: A4_input_action | ||
| 369 | state: "" | ||
| 370 | else: | ||
| 371 | - delay: 20ms | ||
| 372 | - text_sensor.template.publish: | ||
| 373 | id: A4_input_action | ||
| 374 | state: !lambda 'return "";' | ||
| 375 | |||
| 376 | # Example configuration entry | ||
| 377 | pcf8574: | ||
| 378 | - id: 'pcf8574_hub_out_1' # for output channel 1-8 | ||
| 379 | address: 0x21 | ||
| 380 | |||
| 381 | - id: 'pcf8574_hub_out_2' # for output channel 9-16 | ||
| 382 | address: 0x25 | ||
| 383 | |||
| 384 | - id: 'pcf8574_hub_in_1' # for input channel 1-8 | ||
| 385 | address: 0x22 | ||
| 386 | |||
| 387 | - id: 'pcf8574_hub_in_2' # for input channel 9-16 | ||
| 388 | address: 0x24 | ||
| 389 | |||
| 390 | # individual lights | ||
| 391 | |||
| 392 | light: | ||
| 393 | - platform: binary | ||
| 394 | id: e16s_output1_light | ||
| 395 | name: "Entrata 1p Esterna" | ||
| 396 | output: e16s_output1 | ||
| 397 | |||
| 398 | |||
| 399 | - platform: binary | ||
| 400 | id: e16s_output2_light | ||
| 401 | name: "Entrata 1p Ambience" | ||
| 402 | output: e16s_output2 | ||
| 403 | |||
| 404 | - platform: binary | ||
| 405 | id: e16s_output3_light | ||
| 406 | name: "Entrata 1p Luce" | ||
| 407 | output: e16s_output3 | ||
| 408 | |||
| 409 | - platform: binary | ||
| 410 | id: e16s_output4_light | ||
| 411 | name: "Sala Ambience" | ||
| 412 | output: e16s_output4 | ||
| 413 | |||
| 414 | - platform: binary | ||
| 415 | id: e16s_output5_light | ||
| 416 | name: "Sala Cabinet" | ||
| 417 | output: e16s_output5 | ||
| 418 | |||
| 419 | - platform: binary | ||
| 420 | id: e16s_output6_light | ||
| 421 | name: "Sala Luce" | ||
| 422 | output: e16s_output6 | ||
| 423 | |||
| 424 | - platform: binary | ||
| 425 | id: e16s_output7_light | ||
| 426 | name: "Cucina Ambience" | ||
| 427 | output: e16s_output7 | ||
| 428 | |||
| 429 | - platform: binary | ||
| 430 | id: e16s_output8_light | ||
| 431 | name: "Cucina Pensile" | ||
| 432 | output: e16s_output8 | ||
| 433 | |||
| 434 | - platform: binary | ||
| 435 | id: e16s_output9_light | ||
| 436 | name: "Cucina Luce" | ||
| 437 | output: e16s_output9 | ||
| 438 | |||
| 439 | - platform: binary | ||
| 440 | id: e16s_output10_light | ||
| 441 | name: "Antibagno" | ||
| 442 | output: e16s_output10 | ||
| 443 | |||
| 444 | - platform: binary | ||
| 445 | id: e16s_output11_light | ||
| 446 | name: "Bagno Luce" | ||
| 447 | output: e16s_output11 | ||
| 448 | |||
| 449 | - platform: binary | ||
| 450 | id: e16s_output12_light | ||
| 451 | name: "Bagno Specchio" | ||
| 452 | output: e16s_output12 | ||
| 453 | |||
| 454 | - platform: binary | ||
| 455 | id: e16s_output13_light | ||
| 456 | name: "Cameretta Ambience" | ||
| 457 | output: e16s_output13 | ||
| 458 | |||
| 459 | - platform: binary | ||
| 460 | id: e16s_output14_light | ||
| 461 | name: "Cameretta Luce" | ||
| 462 | output: e16s_output14 | ||
| 463 | |||
| 464 | - platform: binary | ||
| 465 | id: e16s_output15_light | ||
| 466 | name: "Master Ambience" | ||
| 467 | output: e16s_output15 | ||
| 468 | |||
| 469 | - platform: binary | ||
| 470 | id: e16s_output16_light | ||
| 471 | name: "Master Luce" | ||
| 472 | output: e16s_output16 | ||
| 473 | |||
| 474 | output: | ||
| 475 | - platform: gpio | ||
| 476 | id: "e16s_output1" | ||
| 477 | pin: | ||
| 478 | pcf8574: pcf8574_hub_out_1 | ||
| 479 | number: 0 | ||
| 480 | mode: OUTPUT | ||
| 481 | inverted: true | ||
| 482 | |||
| 483 | - platform: gpio | ||
| 484 | id: "e16s_output2" | ||
| 485 | pin: | ||
| 486 | pcf8574: pcf8574_hub_out_1 | ||
| 487 | number: 1 | ||
| 488 | mode: OUTPUT | ||
| 489 | inverted: true | ||
| 490 | |||
| 491 | - platform: gpio | ||
| 492 | id: "e16s_output3" | ||
| 493 | pin: | ||
| 494 | pcf8574: pcf8574_hub_out_1 | ||
| 495 | number: 2 | ||
| 496 | mode: OUTPUT | ||
| 497 | inverted: true | ||
| 498 | |||
| 499 | - platform: gpio | ||
| 500 | id: "e16s_output4" | ||
| 501 | pin: | ||
| 502 | pcf8574: pcf8574_hub_out_1 | ||
| 503 | number: 3 | ||
| 504 | mode: OUTPUT | ||
| 505 | inverted: true | ||
| 506 | |||
| 507 | - platform: gpio | ||
| 508 | id: "e16s_output5" | ||
| 509 | pin: | ||
| 510 | pcf8574: pcf8574_hub_out_1 | ||
| 511 | number: 4 | ||
| 512 | mode: OUTPUT | ||
| 513 | inverted: true | ||
| 514 | |||
| 515 | - platform: gpio | ||
| 516 | id: "e16s_output6" | ||
| 517 | pin: | ||
| 518 | pcf8574: pcf8574_hub_out_1 | ||
| 519 | number: 5 | ||
| 520 | mode: OUTPUT | ||
| 521 | inverted: true | ||
| 522 | |||
| 523 | - platform: gpio | ||
| 524 | id: "e16s_output7" | ||
| 525 | pin: | ||
| 526 | pcf8574: pcf8574_hub_out_1 | ||
| 527 | number: 6 | ||
| 528 | mode: OUTPUT | ||
| 529 | inverted: true | ||
| 530 | |||
| 531 | - platform: gpio | ||
| 532 | id: "e16s_output8" | ||
| 533 | pin: | ||
| 534 | pcf8574: pcf8574_hub_out_1 | ||
| 535 | number: 7 | ||
| 536 | mode: OUTPUT | ||
| 537 | inverted: true | ||
| 538 | |||
| 539 | - platform: gpio | ||
| 540 | id: "e16s_output9" | ||
| 541 | pin: | ||
| 542 | pcf8574: pcf8574_hub_out_2 | ||
| 543 | number: 0 | ||
| 544 | mode: OUTPUT | ||
| 545 | inverted: true | ||
| 546 | |||
| 547 | - platform: gpio | ||
| 548 | id: "e16s_output10" | ||
| 549 | pin: | ||
| 550 | pcf8574: pcf8574_hub_out_2 | ||
| 551 | number: 1 | ||
| 552 | mode: OUTPUT | ||
| 553 | inverted: true | ||
| 554 | |||
| 555 | - platform: gpio | ||
| 556 | id: "e16s_output11" | ||
| 557 | pin: | ||
| 558 | pcf8574: pcf8574_hub_out_2 | ||
| 559 | number: 2 | ||
| 560 | mode: OUTPUT | ||
| 561 | inverted: true | ||
| 562 | |||
| 563 | - platform: gpio | ||
| 564 | id: "e16s_output12" | ||
| 565 | pin: | ||
| 566 | pcf8574: pcf8574_hub_out_2 | ||
| 567 | number: 3 | ||
| 568 | mode: OUTPUT | ||
| 569 | inverted: true | ||
| 570 | |||
| 571 | - platform: gpio | ||
| 572 | id: "e16s_output13" | ||
| 573 | pin: | ||
| 574 | pcf8574: pcf8574_hub_out_2 | ||
| 575 | number: 4 | ||
| 576 | mode: OUTPUT | ||
| 577 | inverted: true | ||
| 578 | |||
| 579 | - platform: gpio | ||
| 580 | id: "e16s_output14" | ||
| 581 | pin: | ||
| 582 | pcf8574: pcf8574_hub_out_2 | ||
| 583 | number: 5 | ||
| 584 | mode: OUTPUT | ||
| 585 | inverted: true | ||
| 586 | |||
| 587 | - platform: gpio | ||
| 588 | id: "e16s_output15" | ||
| 589 | pin: | ||
| 590 | pcf8574: pcf8574_hub_out_2 | ||
| 591 | number: 6 | ||
| 592 | mode: OUTPUT | ||
| 593 | inverted: true | ||
| 594 | |||
| 595 | - platform: gpio | ||
| 596 | id: "e16s_output16" | ||
| 597 | pin: | ||
| 598 | pcf8574: pcf8574_hub_out_2 | ||
| 599 | number: 7 | ||
| 600 | mode: OUTPUT | ||
| 601 | inverted: true | ||
| 602 | |||
| 603 | binary_sensor: | ||
| 604 | - platform: gpio | ||
| 605 | name: "" | ||
| 606 | id: "e16s_input1" | ||
| 607 | pin: | ||
| 608 | pcf8574: pcf8574_hub_in_1 | ||
| 609 | number: 0 | ||
| 610 | mode: INPUT | ||
| 611 | inverted: true | ||
| 612 | on_multi_click: | ||
| 613 | - timing: | ||
| 614 | - ON for at most 1s | ||
| 615 | - OFF for at least 0.5s | ||
| 616 | then: | ||
| 617 | - light.toggle: e16s_output1_light | ||
| 618 | - logger.log: e16s_01_input1 Single-Click | ||
| 619 | - text_sensor.template.publish: | ||
| 620 | id: e16s_input1_action | ||
| 621 | state: !lambda 'return "single";' | ||
| 622 | - timing: | ||
| 623 | - ON for at most 1s | ||
| 624 | - OFF for at most 0.3s | ||
| 625 | - ON for at most 1s | ||
| 626 | - OFF for at least 0.2s | ||
| 627 | then: | ||
| 628 | - logger.log: e16s_01_input1 Double-Click | ||
| 629 | - text_sensor.template.publish: | ||
| 630 | id: e16s_input1_action | ||
| 631 | state: !lambda 'return "double";' | ||
| 632 | - timing: | ||
| 633 | - ON for 1s to 4s | ||
| 634 | - OFF for at least 0.2s | ||
| 635 | then: | ||
| 636 | - logger.log: e16s_01_input1 Long-Click | ||
| 637 | - text_sensor.template.publish: | ||
| 638 | id: e16s_input1_action | ||
| 639 | state: !lambda 'return "long";' | ||
| 640 | |||
| 641 | - platform: gpio | ||
| 642 | name: "" | ||
| 643 | id: "e16s_input2" | ||
| 644 | pin: | ||
| 645 | pcf8574: pcf8574_hub_in_1 | ||
| 646 | number: 1 | ||
| 647 | mode: INPUT | ||
| 648 | inverted: true | ||
| 649 | on_multi_click: | ||
| 650 | - timing: | ||
| 651 | - ON for at most 1s | ||
| 652 | - OFF for at least 0.5s | ||
| 653 | then: | ||
| 654 | - light.toggle: e16s_output2_light | ||
| 655 | - logger.log: e16s_01_input2 Single-Click | ||
| 656 | - text_sensor.template.publish: | ||
| 657 | id: e16s_input2_action | ||
| 658 | state: !lambda 'return "single";' | ||
| 659 | - timing: | ||
| 660 | - ON for at most 1s | ||
| 661 | - OFF for at most 0.3s | ||
| 662 | - ON for at most 1s | ||
| 663 | - OFF for at least 0.2s | ||
| 664 | then: | ||
| 665 | - logger.log: e16s_01_input2 Double-Click | ||
| 666 | - text_sensor.template.publish: | ||
| 667 | id: e16s_input2_action | ||
| 668 | state: !lambda 'return "double";' | ||
| 669 | - timing: | ||
| 670 | - ON for 1s to 4s | ||
| 671 | - OFF for at least 0.2s | ||
| 672 | then: | ||
| 673 | - logger.log: e16s_01_input2 Long-Click | ||
| 674 | - text_sensor.template.publish: | ||
| 675 | id: e16s_input2_action | ||
| 676 | state: !lambda 'return "long";' | ||
| 677 | |||
| 678 | - platform: gpio | ||
| 679 | name: "" | ||
| 680 | id: "e16s_input3" | ||
| 681 | pin: | ||
| 682 | pcf8574: pcf8574_hub_in_1 | ||
| 683 | number: 2 | ||
| 684 | mode: INPUT | ||
| 685 | inverted: true | ||
| 686 | on_multi_click: | ||
| 687 | - timing: | ||
| 688 | - ON for at most 1s | ||
| 689 | - OFF for at least 0.5s | ||
| 690 | then: | ||
| 691 | - light.toggle: e16s_output3_light | ||
| 692 | - logger.log: e16s_01_input3 Single-Click | ||
| 693 | - text_sensor.template.publish: | ||
| 694 | id: e16s_input3_action | ||
| 695 | state: !lambda 'return "single";' | ||
| 696 | - timing: | ||
| 697 | - ON for at most 1s | ||
| 698 | - OFF for at most 0.3s | ||
| 699 | - ON for at most 1s | ||
| 700 | - OFF for at least 0.2s | ||
| 701 | then: | ||
| 702 | - logger.log: e16s_01_input3 Double-Click | ||
| 703 | - text_sensor.template.publish: | ||
| 704 | id: e16s_input3_action | ||
| 705 | state: !lambda 'return "double";' | ||
| 706 | - timing: | ||
| 707 | - ON for 1s to 4s | ||
| 708 | - OFF for at least 0.2s | ||
| 709 | then: | ||
| 710 | - logger.log: e16s_01_input3 Long-Click | ||
| 711 | - text_sensor.template.publish: | ||
| 712 | id: e16s_input3_action | ||
| 713 | state: !lambda 'return "long";' | ||
| 714 | |||
| 715 | - platform: gpio | ||
| 716 | name: "" | ||
| 717 | id: "e16s_input4" | ||
| 718 | pin: | ||
| 719 | pcf8574: pcf8574_hub_in_1 | ||
| 720 | number: 3 | ||
| 721 | mode: INPUT | ||
| 722 | inverted: true | ||
| 723 | on_multi_click: | ||
| 724 | - timing: | ||
| 725 | - ON for at most 1s | ||
| 726 | - OFF for at least 0.5s | ||
| 727 | then: | ||
| 728 | - light.toggle: e16s_output4_light | ||
| 729 | - logger.log: e16s_01_input4 Single-Click | ||
| 730 | - text_sensor.template.publish: | ||
| 731 | id: e16s_input4_action | ||
| 732 | state: !lambda 'return "single";' | ||
| 733 | - timing: | ||
| 734 | - ON for at most 1s | ||
| 735 | - OFF for at most 0.3s | ||
| 736 | - ON for at most 1s | ||
| 737 | - OFF for at least 0.2s | ||
| 738 | then: | ||
| 739 | - logger.log: e16s_01_input4 Double-Click | ||
| 740 | - text_sensor.template.publish: | ||
| 741 | id: e16s_input4_action | ||
| 742 | state: !lambda 'return "double";' | ||
| 743 | - timing: | ||
| 744 | - ON for 1s to 4s | ||
| 745 | - OFF for at least 0.2s | ||
| 746 | then: | ||
| 747 | - logger.log: e16s_01_input4 Long-Click | ||
| 748 | - text_sensor.template.publish: | ||
| 749 | id: e16s_input4_action | ||
| 750 | state: !lambda 'return "long";' | ||
| 751 | |||
| 752 | - platform: gpio | ||
| 753 | name: "" | ||
| 754 | id: "e16s_input5" | ||
| 755 | pin: | ||
| 756 | pcf8574: pcf8574_hub_in_1 | ||
| 757 | number: 4 | ||
| 758 | mode: INPUT | ||
| 759 | inverted: true | ||
| 760 | on_multi_click: | ||
| 761 | - timing: | ||
| 762 | - ON for at most 1s | ||
| 763 | - OFF for at least 0.5s | ||
| 764 | then: | ||
| 765 | - light.toggle: e16s_output5_light | ||
| 766 | - logger.log: e16s_01_input5 Single-Click | ||
| 767 | - text_sensor.template.publish: | ||
| 768 | id: e16s_input5_action | ||
| 769 | state: !lambda 'return "single";' | ||
| 770 | - timing: | ||
| 771 | - ON for at most 1s | ||
| 772 | - OFF for at most 0.3s | ||
| 773 | - ON for at most 1s | ||
| 774 | - OFF for at least 0.2s | ||
| 775 | then: | ||
| 776 | - logger.log: e16s_01_input5 Double-Click | ||
| 777 | - text_sensor.template.publish: | ||
| 778 | id: e16s_input5_action | ||
| 779 | state: !lambda 'return "double";' | ||
| 780 | - timing: | ||
| 781 | - ON for 1s to 4s | ||
| 782 | - OFF for at least 0.2s | ||
| 783 | then: | ||
| 784 | - logger.log: e16s_01_input5 Long-Click | ||
| 785 | - text_sensor.template.publish: | ||
| 786 | id: e16s_input5_action | ||
| 787 | state: !lambda 'return "long";' | ||
| 788 | |||
| 789 | - platform: gpio | ||
| 790 | name: "" | ||
| 791 | id: "e16s_input6" | ||
| 792 | pin: | ||
| 793 | pcf8574: pcf8574_hub_in_1 | ||
| 794 | number: 5 | ||
| 795 | mode: INPUT | ||
| 796 | inverted: true | ||
| 797 | on_multi_click: | ||
| 798 | - timing: | ||
| 799 | - ON for at most 1s | ||
| 800 | - OFF for at least 0.5s | ||
| 801 | then: | ||
| 802 | - light.toggle: e16s_output6_light | ||
| 803 | - logger.log: e16s_01_input6 Single-Click | ||
| 804 | - text_sensor.template.publish: | ||
| 805 | id: e16s_input6_action | ||
| 806 | state: !lambda 'return "single";' | ||
| 807 | - timing: | ||
| 808 | - ON for at most 1s | ||
| 809 | - OFF for at most 0.3s | ||
| 810 | - ON for at most 1s | ||
| 811 | - OFF for at least 0.2s | ||
| 812 | then: | ||
| 813 | - logger.log: e16s_01_input6 Double-Click | ||
| 814 | - text_sensor.template.publish: | ||
| 815 | id: e16s_input6_action | ||
| 816 | state: !lambda 'return "double";' | ||
| 817 | - timing: | ||
| 818 | - ON for 1s to 4s | ||
| 819 | - OFF for at least 0.2s | ||
| 820 | then: | ||
| 821 | - logger.log: e16s_01_input6 Long-Click | ||
| 822 | - text_sensor.template.publish: | ||
| 823 | id: e16s_input6_action | ||
| 824 | state: !lambda 'return "long";' | ||
| 825 | |||
| 826 | |||
| 827 | - platform: gpio | ||
| 828 | name: "" | ||
| 829 | id: "e16s_input7" | ||
| 830 | pin: | ||
| 831 | pcf8574: pcf8574_hub_in_1 | ||
| 832 | number: 6 | ||
| 833 | mode: INPUT | ||
| 834 | inverted: true | ||
| 835 | on_multi_click: | ||
| 836 | - timing: | ||
| 837 | - ON for at most 1s | ||
| 838 | - OFF for at least 0.5s | ||
| 839 | then: | ||
| 840 | - light.toggle: e16s_output7_light | ||
| 841 | - logger.log: e16s_01_input7 Single-Click | ||
| 842 | - text_sensor.template.publish: | ||
| 843 | id: e16s_input7_action | ||
| 844 | state: !lambda 'return "single";' | ||
| 845 | - timing: | ||
| 846 | - ON for at most 1s | ||
| 847 | - OFF for at most 0.3s | ||
| 848 | - ON for at most 1s | ||
| 849 | - OFF for at least 0.2s | ||
| 850 | then: | ||
| 851 | - logger.log: e16s_01_input7 Double-Click | ||
| 852 | - text_sensor.template.publish: | ||
| 853 | id: e16s_input7_action | ||
| 854 | state: !lambda 'return "double";' | ||
| 855 | - timing: | ||
| 856 | - ON for 1s to 4s | ||
| 857 | - OFF for at least 0.2s | ||
| 858 | then: | ||
| 859 | - logger.log: e16s_01_input7 Long-Click | ||
| 860 | - text_sensor.template.publish: | ||
| 861 | id: e16s_input7_action | ||
| 862 | state: !lambda 'return "long";' | ||
| 863 | |||
| 864 | |||
| 865 | - platform: gpio | ||
| 866 | name: "" | ||
| 867 | id: "e16s_input8" | ||
| 868 | pin: | ||
| 869 | pcf8574: pcf8574_hub_in_1 | ||
| 870 | number: 7 | ||
| 871 | mode: INPUT | ||
| 872 | inverted: true | ||
| 873 | on_multi_click: | ||
| 874 | - timing: | ||
| 875 | - ON for at most 1s | ||
| 876 | - OFF for at least 0.5s | ||
| 877 | then: | ||
| 878 | - light.toggle: e16s_output8_light | ||
| 879 | - logger.log: e16s_01_input8 Single-Click | ||
| 880 | - text_sensor.template.publish: | ||
| 881 | id: e16s_input8_action | ||
| 882 | state: !lambda 'return "single";' | ||
| 883 | - timing: | ||
| 884 | - ON for at most 1s | ||
| 885 | - OFF for at most 0.3s | ||
| 886 | - ON for at most 1s | ||
| 887 | - OFF for at least 0.2s | ||
| 888 | then: | ||
| 889 | - logger.log: e16s_01_input8 Double-Click | ||
| 890 | - text_sensor.template.publish: | ||
| 891 | id: e16s_input8_action | ||
| 892 | state: !lambda 'return "double";' | ||
| 893 | - timing: | ||
| 894 | - ON for 1s to 4s | ||
| 895 | - OFF for at least 0.2s | ||
| 896 | then: | ||
| 897 | - logger.log: e16s_01_input8 Long-Click | ||
| 898 | - text_sensor.template.publish: | ||
| 899 | id: e16s_input8_action | ||
| 900 | state: !lambda 'return "long";' | ||
| 901 | |||
| 902 | |||
| 903 | - platform: gpio | ||
| 904 | name: "" | ||
| 905 | id: "e16s_input9" | ||
| 906 | pin: | ||
| 907 | pcf8574: pcf8574_hub_in_2 | ||
| 908 | number: 0 | ||
| 909 | mode: INPUT | ||
| 910 | inverted: true | ||
| 911 | on_multi_click: | ||
| 912 | - timing: | ||
| 913 | - ON for at most 1s | ||
| 914 | - OFF for at least 0.5s | ||
| 915 | then: | ||
| 916 | - light.toggle: e16s_output9_light | ||
| 917 | - logger.log: e16s_01_input9 Single-Click | ||
| 918 | - text_sensor.template.publish: | ||
| 919 | id: e16s_input9_action | ||
| 920 | state: !lambda 'return "single";' | ||
| 921 | - timing: | ||
| 922 | - ON for at most 1s | ||
| 923 | - OFF for at most 0.3s | ||
| 924 | - ON for at most 1s | ||
| 925 | - OFF for at least 0.2s | ||
| 926 | then: | ||
| 927 | - logger.log: e16s_01_input9 Double-Click | ||
| 928 | - text_sensor.template.publish: | ||
| 929 | id: e16s_input9_action | ||
| 930 | state: !lambda 'return "double";' | ||
| 931 | - timing: | ||
| 932 | - ON for 1s to 4s | ||
| 933 | - OFF for at least 0.2s | ||
| 934 | then: | ||
| 935 | - logger.log: e16s_01_input9 Long-Click | ||
| 936 | - text_sensor.template.publish: | ||
| 937 | id: e16s_input9_action | ||
| 938 | state: !lambda 'return "long";' | ||
| 939 | |||
| 940 | |||
| 941 | - platform: gpio | ||
| 942 | name: "" | ||
| 943 | id: "e16s_input10" | ||
| 944 | pin: | ||
| 945 | pcf8574: pcf8574_hub_in_2 | ||
| 946 | number: 1 | ||
| 947 | mode: INPUT | ||
| 948 | inverted: true | ||
| 949 | on_multi_click: | ||
| 950 | - timing: | ||
| 951 | - ON for at most 1s | ||
| 952 | - OFF for at least 0.5s | ||
| 953 | then: | ||
| 954 | - light.toggle: e16s_output10_light | ||
| 955 | - logger.log: e16s_01_input10 Single-Click | ||
| 956 | - text_sensor.template.publish: | ||
| 957 | id: e16s_input10_action | ||
| 958 | state: !lambda 'return "single";' | ||
| 959 | - timing: | ||
| 960 | - ON for at most 1s | ||
| 961 | - OFF for at most 0.3s | ||
| 962 | - ON for at most 1s | ||
| 963 | - OFF for at least 0.2s | ||
| 964 | then: | ||
| 965 | - logger.log: e16s_01_input10 Double-Click | ||
| 966 | - text_sensor.template.publish: | ||
| 967 | id: e16s_input10_action | ||
| 968 | state: !lambda 'return "double";' | ||
| 969 | - timing: | ||
| 970 | - ON for 1s to 4s | ||
| 971 | - OFF for at least 0.2s | ||
| 972 | then: | ||
| 973 | - logger.log: e16s_01_input10 Long-Click | ||
| 974 | - text_sensor.template.publish: | ||
| 975 | id: e16s_input10_action | ||
| 976 | state: !lambda 'return "long";' | ||
| 977 | |||
| 978 | |||
| 979 | - platform: gpio | ||
| 980 | name: "" | ||
| 981 | id: "e16s_input11" | ||
| 982 | pin: | ||
| 983 | pcf8574: pcf8574_hub_in_2 | ||
| 984 | number: 2 | ||
| 985 | mode: INPUT | ||
| 986 | inverted: true | ||
| 987 | on_multi_click: | ||
| 988 | - timing: | ||
| 989 | - ON for at most 1s | ||
| 990 | - OFF for at least 0.5s | ||
| 991 | then: | ||
| 992 | - light.toggle: e16s_output11_light | ||
| 993 | - logger.log: e16s_01_input11 Single-Click | ||
| 994 | - text_sensor.template.publish: | ||
| 995 | id: e16s_input11_action | ||
| 996 | state: !lambda 'return "single";' | ||
| 997 | - timing: | ||
| 998 | - ON for at most 1s | ||
| 999 | - OFF for at most 0.3s | ||
| 1000 | - ON for at most 1s | ||
| 1001 | - OFF for at least 0.2s | ||
| 1002 | then: | ||
| 1003 | - logger.log: e16s_01_input11 Double-Click | ||
| 1004 | - text_sensor.template.publish: | ||
| 1005 | id: e16s_input11_action | ||
| 1006 | state: !lambda 'return "double";' | ||
| 1007 | - timing: | ||
| 1008 | - ON for 1s to 4s | ||
| 1009 | - OFF for at least 0.2s | ||
| 1010 | then: | ||
| 1011 | - logger.log: e16s_01_input11 Long-Click | ||
| 1012 | - text_sensor.template.publish: | ||
| 1013 | id: e16s_input11_action | ||
| 1014 | state: !lambda 'return "long";' | ||
| 1015 | |||
| 1016 | - platform: gpio | ||
| 1017 | name: "" | ||
| 1018 | id: "e16s_input12" | ||
| 1019 | pin: | ||
| 1020 | pcf8574: pcf8574_hub_in_2 | ||
| 1021 | number: 3 | ||
| 1022 | mode: INPUT | ||
| 1023 | inverted: true | ||
| 1024 | on_multi_click: | ||
| 1025 | - timing: | ||
| 1026 | - ON for at most 1s | ||
| 1027 | - OFF for at least 0.5s | ||
| 1028 | then: | ||
| 1029 | - light.toggle: e16s_output12_light | ||
| 1030 | - logger.log: e16s_01_input12 Single-Click | ||
| 1031 | - text_sensor.template.publish: | ||
| 1032 | id: e16s_input12_action | ||
| 1033 | state: !lambda 'return "single";' | ||
| 1034 | - timing: | ||
| 1035 | - ON for at most 1s | ||
| 1036 | - OFF for at most 0.3s | ||
| 1037 | - ON for at most 1s | ||
| 1038 | - OFF for at least 0.2s | ||
| 1039 | then: | ||
| 1040 | - logger.log: e16s_01_input12 Double-Click | ||
| 1041 | - text_sensor.template.publish: | ||
| 1042 | id: e16s_input12_action | ||
| 1043 | state: !lambda 'return "double";' | ||
| 1044 | - timing: | ||
| 1045 | - ON for 1s to 4s | ||
| 1046 | - OFF for at least 0.2s | ||
| 1047 | then: | ||
| 1048 | - logger.log: e16s_01_input12 Long-Click | ||
| 1049 | - text_sensor.template.publish: | ||
| 1050 | id: e16s_input12_action | ||
| 1051 | state: !lambda 'return "long";' | ||
| 1052 | |||
| 1053 | - platform: gpio | ||
| 1054 | name: "" | ||
| 1055 | id: "e16s_input13" | ||
| 1056 | pin: | ||
| 1057 | pcf8574: pcf8574_hub_in_2 | ||
| 1058 | number: 4 | ||
| 1059 | mode: INPUT | ||
| 1060 | inverted: true | ||
| 1061 | on_multi_click: | ||
| 1062 | - timing: | ||
| 1063 | - ON for at most 1s | ||
| 1064 | - OFF for at least 0.5s | ||
| 1065 | then: | ||
| 1066 | - light.toggle: e16s_output13_light | ||
| 1067 | - logger.log: e16s_01_input13 Single-Click | ||
| 1068 | - text_sensor.template.publish: | ||
| 1069 | id: e16s_input13_action | ||
| 1070 | state: !lambda 'return "single";' | ||
| 1071 | - timing: | ||
| 1072 | - ON for at most 1s | ||
| 1073 | - OFF for at most 0.3s | ||
| 1074 | - ON for at most 1s | ||
| 1075 | - OFF for at least 0.2s | ||
| 1076 | then: | ||
| 1077 | - logger.log: e16s_01_input13 Double-Click | ||
| 1078 | - text_sensor.template.publish: | ||
| 1079 | id: e16s_input13_action | ||
| 1080 | state: !lambda 'return "double";' | ||
| 1081 | - timing: | ||
| 1082 | - ON for 1s to 4s | ||
| 1083 | - OFF for at least 0.2s | ||
| 1084 | then: | ||
| 1085 | - logger.log: e16s_01_input13 Long-Click | ||
| 1086 | - text_sensor.template.publish: | ||
| 1087 | id: e16s_input13_action | ||
| 1088 | state: !lambda 'return "long";' | ||
| 1089 | |||
| 1090 | - platform: gpio | ||
| 1091 | name: "" | ||
| 1092 | id: "e16s_input14" | ||
| 1093 | pin: | ||
| 1094 | pcf8574: pcf8574_hub_in_2 | ||
| 1095 | number: 5 | ||
| 1096 | mode: INPUT | ||
| 1097 | inverted: true | ||
| 1098 | on_multi_click: | ||
| 1099 | - timing: | ||
| 1100 | - ON for at most 1s | ||
| 1101 | - OFF for at least 0.5s | ||
| 1102 | then: | ||
| 1103 | - light.toggle: e16s_output14_light | ||
| 1104 | - logger.log: e16s_01_input14 Single-Click | ||
| 1105 | - text_sensor.template.publish: | ||
| 1106 | id: e16s_input14_action | ||
| 1107 | state: !lambda 'return "single";' | ||
| 1108 | - timing: | ||
| 1109 | - ON for at most 1s | ||
| 1110 | - OFF for at most 0.3s | ||
| 1111 | - ON for at most 1s | ||
| 1112 | - OFF for at least 0.2s | ||
| 1113 | then: | ||
| 1114 | - logger.log: e16s_01_input14 Double-Click | ||
| 1115 | - text_sensor.template.publish: | ||
| 1116 | id: e16s_input14_action | ||
| 1117 | state: !lambda 'return "double";' | ||
| 1118 | - timing: | ||
| 1119 | - ON for 1s to 4s | ||
| 1120 | - OFF for at least 0.2s | ||
| 1121 | then: | ||
| 1122 | - logger.log: e16s_01_input14 Long-Click | ||
| 1123 | - text_sensor.template.publish: | ||
| 1124 | id: e16s_input14_action | ||
| 1125 | state: !lambda 'return "long";' | ||
| 1126 | |||
| 1127 | - platform: gpio | ||
| 1128 | name: "" | ||
| 1129 | id: "e16s_input15" | ||
| 1130 | pin: | ||
| 1131 | pcf8574: pcf8574_hub_in_2 | ||
| 1132 | number: 6 | ||
| 1133 | mode: INPUT | ||
| 1134 | inverted: true | ||
| 1135 | on_multi_click: | ||
| 1136 | - timing: | ||
| 1137 | - ON for at most 1s | ||
| 1138 | - OFF for at least 0.5s | ||
| 1139 | then: | ||
| 1140 | - light.toggle: e16s_output15_light | ||
| 1141 | - logger.log: e16s_01_input15 Single-Click | ||
| 1142 | - text_sensor.template.publish: | ||
| 1143 | id: e16s_input15_action | ||
| 1144 | state: !lambda 'return "single";' | ||
| 1145 | - timing: | ||
| 1146 | - ON for at most 1s | ||
| 1147 | - OFF for at most 0.3s | ||
| 1148 | - ON for at most 1s | ||
| 1149 | - OFF for at least 0.2s | ||
| 1150 | then: | ||
| 1151 | - logger.log: e16s_01_input15 Double-Click | ||
| 1152 | - text_sensor.template.publish: | ||
| 1153 | id: e16s_input15_action | ||
| 1154 | state: !lambda 'return "double";' | ||
| 1155 | - timing: | ||
| 1156 | - ON for 1s to 4s | ||
| 1157 | - OFF for at least 0.2s | ||
| 1158 | then: | ||
| 1159 | - logger.log: e16s_01_input15 Long-Click | ||
| 1160 | - text_sensor.template.publish: | ||
| 1161 | id: e16s_input15_action | ||
| 1162 | state: !lambda 'return "long";' | ||
| 1163 | |||
| 1164 | - platform: gpio | ||
| 1165 | name: "" | ||
| 1166 | id: "e16s_input16" | ||
| 1167 | pin: | ||
| 1168 | pcf8574: pcf8574_hub_in_2 | ||
| 1169 | number: 7 | ||
| 1170 | mode: INPUT | ||
| 1171 | inverted: true | ||
| 1172 | on_multi_click: | ||
| 1173 | - timing: | ||
| 1174 | - ON for at most 1s | ||
| 1175 | - OFF for at least 0.5s | ||
| 1176 | then: | ||
| 1177 | - light.toggle: e16s_output16_light | ||
| 1178 | - logger.log: e16s_01_input16 Single-Click | ||
| 1179 | - text_sensor.template.publish: | ||
| 1180 | id: e16s_input10_action | ||
| 1181 | state: !lambda 'return "single";' | ||
| 1182 | - timing: | ||
| 1183 | - ON for at most 1s | ||
| 1184 | - OFF for at most 0.3s | ||
| 1185 | - ON for at most 1s | ||
| 1186 | - OFF for at least 0.2s | ||
| 1187 | then: | ||
| 1188 | - logger.log: e16s_01_input16 Double-Click | ||
| 1189 | - text_sensor.template.publish: | ||
| 1190 | id: e16s_input16_action | ||
| 1191 | state: !lambda 'return "double";' | ||
| 1192 | - timing: | ||
| 1193 | - ON for 1s to 4s | ||
| 1194 | - OFF for at least 0.2s | ||
| 1195 | then: | ||
| 1196 | - logger.log: e16s_01_input16 Long-Click | ||
| 1197 | - text_sensor.template.publish: | ||
| 1198 | id: e16s_input16_action | ||
| 1199 | state: !lambda 'return "long";' | ||
| 1200 | |||
| 1201 | - platform: gpio | ||
| 1202 | name: "" | ||
| 1203 | id: "A1_input" | ||
| 1204 | pin: | ||
| 1205 | number: 36 | ||
| 1206 | mode: INPUT | ||
| 1207 | #inverted: true | ||
| 1208 | on_multi_click: | ||
| 1209 | - timing: | ||
| 1210 | - ON for at most 1s | ||
| 1211 | - OFF for at least 0.5s | ||
| 1212 | then: | ||
| 1213 | - light.toggle: e16s_output16_light | ||
| 1214 | - logger.log: e16s_01_A1_input Single-Click | ||
| 1215 | - text_sensor.template.publish: | ||
| 1216 | id: A1_input_action | ||
| 1217 | state: !lambda 'return "single";' | ||
| 1218 | - timing: | ||
| 1219 | - ON for at most 1s | ||
| 1220 | - OFF for at most 0.3s | ||
| 1221 | - ON for at most 1s | ||
| 1222 | - OFF for at least 0.2s | ||
| 1223 | then: | ||
| 1224 | - logger.log: e16s_01_A1_input Double-Click | ||
| 1225 | - text_sensor.template.publish: | ||
| 1226 | id: A1_input_action | ||
| 1227 | state: !lambda 'return "double";' | ||
| 1228 | - timing: | ||
| 1229 | - ON for 1s to 4s | ||
| 1230 | - OFF for at least 0.2s | ||
| 1231 | then: | ||
| 1232 | - logger.log: e16s_01_A1_input Long-Click | ||
| 1233 | - text_sensor.template.publish: | ||
| 1234 | id: A1_input_action | ||
| 1235 | state: !lambda 'return "long";' | ||
| 1236 | |||
| 1237 | - platform: gpio | ||
| 1238 | name: "" | ||
| 1239 | id: "A2_input" | ||
| 1240 | pin: | ||
| 1241 | number: 35 | ||
| 1242 | mode: INPUT | ||
| 1243 | #inverted: true | ||
| 1244 | on_multi_click: | ||
| 1245 | - timing: | ||
| 1246 | - ON for at most 1s | ||
| 1247 | - OFF for at least 0.5s | ||
| 1248 | then: | ||
| 1249 | - logger.log: e16s_01_A2_input Single-Click | ||
| 1250 | - text_sensor.template.publish: | ||
| 1251 | id: A2_input_action | ||
| 1252 | state: !lambda 'return "single";' | ||
| 1253 | - timing: | ||
| 1254 | - ON for at most 1s | ||
| 1255 | - OFF for at most 0.3s | ||
| 1256 | - ON for at most 1s | ||
| 1257 | - OFF for at least 0.2s | ||
| 1258 | then: | ||
| 1259 | - logger.log: e16s_01_A2_input Double-Click | ||
| 1260 | - text_sensor.template.publish: | ||
| 1261 | id: A2_input_action | ||
| 1262 | state: !lambda 'return "double";' | ||
| 1263 | - timing: | ||
| 1264 | - ON for 1s to 4s | ||
| 1265 | - OFF for at least 0.2s | ||
| 1266 | then: | ||
| 1267 | - logger.log: e16s_01_A2_input Long-Click | ||
| 1268 | - text_sensor.template.publish: | ||
| 1269 | id: A2_input_action | ||
| 1270 | state: !lambda 'return "long";' | ||
| 1271 | |||
| 1272 | - platform: gpio | ||
| 1273 | name: "" | ||
| 1274 | id: "A3_input" | ||
| 1275 | pin: | ||
| 1276 | number: 34 | ||
| 1277 | mode: INPUT | ||
| 1278 | #inverted: true | ||
| 1279 | on_multi_click: | ||
| 1280 | - timing: | ||
| 1281 | - ON for at most 1s | ||
| 1282 | - OFF for at least 0.5s | ||
| 1283 | then: | ||
| 1284 | - logger.log: e16s_01_A3_input Single-Click | ||
| 1285 | - text_sensor.template.publish: | ||
| 1286 | id: A3_input_action | ||
| 1287 | state: !lambda 'return "single";' | ||
| 1288 | - timing: | ||
| 1289 | - ON for at most 1s | ||
| 1290 | - OFF for at most 0.3s | ||
| 1291 | - ON for at most 1s | ||
| 1292 | - OFF for at least 0.2s | ||
| 1293 | then: | ||
| 1294 | - logger.log: e16s_01_A3_input Double-Click | ||
| 1295 | - text_sensor.template.publish: | ||
| 1296 | id: A3_input_action | ||
| 1297 | state: !lambda 'return "double";' | ||
| 1298 | - timing: | ||
| 1299 | - ON for 1s to 4s | ||
| 1300 | - OFF for at least 0.2s | ||
| 1301 | then: | ||
| 1302 | - logger.log: e16s_01_A3_input Long-Click | ||
| 1303 | - text_sensor.template.publish: | ||
| 1304 | id: A3_input_action | ||
| 1305 | state: !lambda 'return "long";' | ||
| 1306 | |||
| 1307 | - platform: gpio | ||
| 1308 | name: "" | ||
| 1309 | id: "A4_input" | ||
| 1310 | pin: | ||
| 1311 | number: 39 | ||
| 1312 | mode: INPUT | ||
| 1313 | #inverted: true | ||
| 1314 | on_multi_click: | ||
| 1315 | - timing: | ||
| 1316 | - ON for at most 1s | ||
| 1317 | - OFF for at least 0.5s | ||
| 1318 | then: | ||
| 1319 | - logger.log: e16s_01_A4_input Single-Click | ||
| 1320 | - text_sensor.template.publish: | ||
| 1321 | id: A4_input_action | ||
| 1322 | state: !lambda 'return "single";' | ||
| 1323 | - timing: | ||
| 1324 | - ON for at most 1s | ||
| 1325 | - OFF for at most 0.3s | ||
| 1326 | - ON for at most 1s | ||
| 1327 | - OFF for at least 0.2s | ||
| 1328 | then: | ||
| 1329 | - logger.log: e16s_01_A4_input Double-Click | ||
| 1330 | - text_sensor.template.publish: | ||
| 1331 | id: A4_input_action | ||
| 1332 | state: !lambda 'return "double";' | ||
| 1333 | - timing: | ||
| 1334 | - ON for 1s to 4s | ||
| 1335 | - OFF for at least 0.2s | ||
| 1336 | then: | ||
| 1337 | - logger.log: e16s_01_A4_input Long-Click | ||
| 1338 | - text_sensor.template.publish: | ||
| 1339 | id: A4_input_action | ||
| 1340 | state: !lambda 'return "long";' | ||
| 1341 | {{/code}} |
