How to "feed" the esphome text sensor with messages from Home Assistant?

Hello
i have the MAX7219 Matrix Display flashed with ESPhome. now i struggeling in how to provide the text sensor the messages, for example “garage door open” or “washingmachine finished” or, or…
can someone point me in the right direction how to deal with this???

br dave

I have one that displays a float value of the temperature and I use the following:

First get the value from home assistant:

sensor:
  - platform: homeassistant
    name: "screentemp"
    entity_id: sensor.screentemp
    id: screentemp

Then to display it I use:

display:
  - platform: max7219
    cs_pin: GPIO02
    num_chips: 1
    lambda: |-
     it.printf(0, "%.1f", id(screentempold).state);
     it.printf(4, "%.1f", id(screentemp).state);

Hope that helps you at least a bit (?).

ok got it.

it is not exactly what i m trying to setup.
is it possible to define a entity in home assistant which provides different text information?
like i said if the garage is open and it is after 9 p.m. “garage door open” if the washing machine is finished “washing machine finished”, if the mower starts his work “mower started” and so on…
if everything is fine the display should show nothing. do you have an idea how a setup can look like?

Use an input text. https://www.home-assistant.io/integrations/input_text/
Then use some automations to set the input text value which is then mirrored in the ESPHome.
I haven’t tried it, but it’s essentially the same as I have. Just I use floats, you use text.

I am looking for a “device like this” these days in order to have a report from some basic sensors
eg Garage door, temperature etc.,
My problem is that I would like to install it in my living room so I am looking for a device that my wife could accept it (good looking etc).
Is there any alternatives with more premium look?

Tablet with companion app and a lovelace screen?
I don’t think there is anything else that is good looking when you purchase it. You have to build it pretty.

You are right, but I was hoping to avoid it. The only place I could install it is far away.
I just noticed that there are this kind off apps which could help. But I am not sure how I could automate to read the text of my sensors.

This works great for me

text_sensor:
  - platform: homeassistant
    name: "screentemp"
    entity_id: input_text.oled_display
    id: screentemp
    
display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    reset_pin: 0
    address: 0x3C
    lambda: |-
      std::string val = to_string(id(screentemp).state);
      it.printf(4, 4, id(my_font), "%s",id(screentemp).state.c_str());
2 Likes

Thank you adityapattiyeri
I was struggling with same case - print in display value from text sensor.
After some investigation I observed that in your case, this has to be enough. At least in my case it worked.

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    reset_pin: 0
    address: 0x3C
    lambda: |-
      it.printf(4, 4, id(my_font), "%s",to_string(id(screentemp).state).c_str());
1 Like

Thanks, this is by far the easiest/smallest implementation i’ve seen so far :slight_smile: