Yeah, like others, this kind of snuck up on me. Very quickly checked the documentation, tried to add the line to ignore the duplication and it wouldn’t pass validation in HA, so I’ve put it off for the time being.
Of note, the documentation page for the display I’m using is still using an example config that duplicates GPIO pins, so someone who knows this stuff better than I might want to update it lest it cause issues for the next guy.
I’ll figure it out eventually since I’ve figured out my issues in the past, but I wanted to chime in.
Edit: Okay, figured it out, but I’ve seen more than a few devs say that reusing GPIO pins is bad practice and honestly don’t know where to start with the st7789v since even the documentation is instructing me to reuse the pin. It’s compiling and working, so I guess I’ll just leave it be for the time being.
Does it? I can’t see that. Would you please tell me exactly where that is? ST7789V TFT LCD — ESPHome
What the docs for Pin Schema say is that there may be cases where pin sharing is needed, and it allows for that
allow_other_uses (Optional, boolean): If the pin is also specified elsewhere in the configuration. By default multiple uses of the same pin will be flagged as an error. This option will suppress the error and is intended for rare cases where a pin is shared between multiple components. Defaults to false.
None of the examples here should actually be using the workaround. They are examples of why this validation was added. If you need help de-duplicating your pins, then come ask on the esphome discord.
I don’t think that’s a good reason, the template sensor can always use the data from the sensor wihich is the ‘first user’ of that pin. And if it is the same type you also can use the copy component Copy Integration — ESPHome.
but why log considers cs_pin 5 as pin 4 (Pin 4 is used in multiple places.)
maybe it is clear to you, i am new
if i see it correctly - i am using pin 4 once (backlight) and pin 5 once (cs_pin)
Pin 4 is used in multiple places.
platform: st7789v
model: TTGO_TDISPLAY_135X240
cs_pin:
number: 5
mode:
output: True
input: False
open_drain: False
pullup: False
pulldown: False
inverted: False
ignore_pin_validation_error: False