I have an Adafruit Magtag that I’m trying to display a list of the days tasks on.
I’ve created a sensor in homeassistant that I’ve confirmed works in homeassistant. I’ve been unsuccessful in getting the sensor to write to the display. I attempted to log if the sensor data is getting to the magtag device, and the log shows it isn’t, however I’m not sure the logger is setup correctly.
Any help would be appreciated.
text_sensor:
- platform: homeassistant
id: calevents_daily_from_ha
entity_id: sensor.calevents_daily
attribute: list
on_value:
then:
- logger.log:
format: "the calender is %s"
args: [ 'id(calevents_daily_from_ha).state.c_str()' ]
#for the display
spi:
clk_pin: GPIO36
mosi_pin: GPIO35
miso_pin: GPIO37
#display for the magtag in the esphome docs is gdew029t5
display:
- platform: waveshare_epaper
cs_pin: GPIO8
dc_pin: GPIO7
busy_pin: GPIO5
reset_pin: GPIO6
model: gdew029t5
update_interval: 30s
rotation: 270
lambda: |-
it.print(0, 20, id(roboto_big), "Hello World");
it.printf(0, 0, id(roboto_big), "%s", id(calevents_daily_from_ha).state.c_str());
Which resulted in the magtag displaying
Hello World
1.836559
|b|?
and two errors in the log:
Encountered character without representation in font: ‘\x8c’
Encountered character without representation in font: ‘\xfd’
It turned out that my original code is fine. While the ESPHome Builder recognized and allowed me to edit, compile, and send files to the Magtag, the ESPHome integration did not know that the Magtag was a ESPHome device. On the homeassistant front end notifications, there was a “new device” found and it was the Magtag. Once I added it, everything began to work. Problem solved!