Advertisement
GozuMezu

Boolean Icons

Nov 26th, 2021
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.10 KB | None | 0 0
  1. display:
  2.   - platform: ssd1306_i2c
  3.     model: "SSD1306 128x32"
  4.     address: 0x3C
  5.     id: handheld_oled
  6.     pages:
  7.       - id: page1
  8.         lambda: |-
  9.                 if (id(handheld_bool_beest).state) {
  10.                   it.print((it.get_width() / 8)*7, it.get_height() / 2, id(icon_30), TextAlign::CENTER, "󱍢");
  11.                 }
  12.                 else if (id(handheld_bool_vuilzakken).state) {
  13.                   it.print((it.get_width() / 8)*7, it.get_height() / 2, id(icon_30), TextAlign::CENTER, "󰩹");
  14.                 }
  15.                 else if(id(handheld_bool_was).state){
  16.                   it.print((it.get_width() / 8)*7, it.get_height() / 2, id(icon_30), TextAlign::CENTER, "󱆼");
  17.                 }
  18.                 else if(id(handheld_bool_vlag).state) {
  19.                   it.print((it.get_width() / 8)*7, it.get_height() / 2, id(icon_30), TextAlign::CENTER, "󰈻");
  20.                 }
  21.                 else {
  22.                   it.printf((it.get_width() / 8)*7, it.get_height() / 2, id(icon_30), TextAlign::CENTER, "%s", id(handheld_sensor_status).state ? "󱜙" : "󱚡");
  23.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement