I am using a xpt2046 touch screen and it works well - with one issue. When the ESPHome node starts up the status of the touch switches (binary sensors) shows as ‘unknown’ in Home Assistant. Once they are touched once they then work perfectly until the next power cycle or reset.
The applicable yaml for one of the binary sensors is:
- platform: xpt2046
xpt2046_id: touch
id: key_mode
x_min: 165
x_max: 320
y_min: 0
y_max: 60
name: "Central Heating - Mode"
I have tried adding publish_initial_state: true
but this made no difference.
Is there a way to force the initial state to off?