ioBroker.esphome icon indicating copy to clipboard operation
ioBroker.esphome copied to clipboard

Support for Displays

Open ahnungsbefreit opened this issue 3 years ago • 10 comments

ESPHome Integration in ioBroker is already working very nicely and my preferred platform for new devices. However, the missing ability to use displays and send text to be displayed directly from ioBroker is one of the few features I am really missing for now.

Example:

`# SSD1306 Display

font:

  • file: "LiberationSans-Regular.ttf" id: font1 size: 20

  • file: "LiberationSans-Regular.ttf" id: font2 size: 14

display:

  • platform: ssd1306_i2c model: "SSD1306 128x64" address: 0x3C lambda: |- it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "Wetter");

    // Print temperature if (id(temperature).has_state()) { it.printf(100, 20, id(font1), TextAlign::TOP_RIGHT , "%.1f°", id(temperature).state); }

    // Print humidity if (id(humidity).has_state()) { it.printf(100, 40, id(font1), TextAlign::TOP_RIGHT , "%.1f%%", id(humidity).state); }`

In this example I am using a lambda to display values of sensors connected to the same ESP. But if the value could be populated directly via MQTT it would be even more flexible. For the fonts, we might go with one predefined font for now and add selection of fonts later.

ahnungsbefreit avatar Jul 19 '21 14:07 ahnungsbefreit

I need to get a display here to get this working :)

DutchmanNL avatar Aug 24 '21 14:08 DutchmanNL

In this example I am using a lambda to display values of sensors connected to the same ESP. But if the value could be populated directly via MQTT it would be even more flexible. For the fonts, we might go with one predefined font for now and add selection of fonts later.

looking at it, this should already be possible but you have to define an input.....! Example :

sensor:
  - platform: ...
    # ...
    id: my_sensor

display:
  - platform: ...
    # ...
    lambda: |-
      it.printf(0, 0, id(my_font), "The sensor value is: %.1f", id(my_sensor).state);
      // If the sensor has the value 30.02, the result will be: "The sensor value is: 30.0"

as you assig a id to that sensor (which could be any input) you can also use that to create a state for ioBroker, so I assume but using a text-sensor, or state you can use that with an action to show on the display ?

DutchmanNL avatar Aug 24 '21 15:08 DutchmanNL

not possible currently to send data to text sensors : https://github.com/Nafaya/esphome-native-api/issues/14

DutchmanNL avatar Aug 27 '21 18:08 DutchmanNL

@DutchmanNL so we need to wait until this is supported by the API, right?

ahnungsbefreit avatar Sep 03 '21 14:09 ahnungsbefreit

@DutchmanNL so we need to wait until this is supported by the API, right?

Jup, but already trying to find a workaround have some ideas with web services to handle it

DutchmanNL avatar Sep 03 '21 16:09 DutchmanNL

Hello DutchmanNL,

graph is a local Funktion on the ESP. Only Version 2021.10 is needed, because if i write graph: in the yaml, will signed an error in the editor

marthorn avatar Jan 12 '22 13:01 marthorn

Hello DutchmanNL,

graph is a local Funktion on the ESP. Only Version 2021.10 is needed, because if i write graph: in the yaml, will signed an error in the editor

ah clear! will make new release this weekend including 2021.10

DutchmanNL avatar Jan 12 '22 15:01 DutchmanNL

Super, danke schön,

und wenn es keine Umstände macht, es gibt auch noch neueres Release von von esphome

marthorn avatar Jan 12 '22 21:01 marthorn

Super, danke schön,

und wenn es keine Umstände macht, es gibt auch noch neueres Release von von esphome

werde die zu dem Zeitpunk aktuellste nemen

DutchmanNL avatar Jan 13 '22 16:01 DutchmanNL

Hallo Dutchman,

Wollte noch mal nachfragen, ob und wann du das neue Release einbaust. Danke schon mal vorab :)

marthorn avatar Mar 27 '22 07:03 marthorn