Closed bepstein111 closed 6 months ago
This is a new feature to stop misconfiguration where you reuse a pin by accident, It seems that this might be an edge case they have not captured in the feature release of 2023.12
Seems like someone has lodged a bug for this and the answer is to add Add "allow_other_uses: true"
I have not updated to 2023.12 yet but I would suggest adding it to the switch and see what happens
switch:
[allow_other_uses] is an invalid option for [switch.gpio]. Please check the indentation.
hmmmm
Ok had a play, The code needs to be updated as following
switch:
- platform: gpio
pin:
number: GPIO4
allow_other_uses: true
name: "${upper_devicename} Backlight"
id: backlight
restore_mode: ALWAYS_ON
and
backlight_pin:
number: GPIO4
allow_other_uses: true
This will need to be rolled into the main code by @kylemanna going forward
Yep, just figured this out myself, they finally seem to have added it to the documentation. For reference: https://esphome.io/guides/configuration-types.html?highlight=allow_other_uses#pin-schema
I'll throw a pull request together.
Unsure if this is a bug that ESPHome introduced, but when I went to update my sniffer with a new version, it complained that "Pin 4 is used in multiple places," both in as a gpio switch and as the backlight pin for the st7789v. Are you aware of this?