paul6502
(Paul Newbold)
1
Has anyone else has issues compiling for sn74hc595 after updating Home Assistant and/or ESPHome recently?
HA is 2021.10.6
ESPHome is 2021.10.2
Errors I get from the compile are as follows:
INFO Reading configuration /config/esphome/dollshouse.yaml...
Failed config
switch.gpio: [source /config/esphome/dollshouse.yaml:152]
platform: gpio
name: dollshouse_p8
id: dollshouse_p8
pin: [source /config/esphome/dollshouse.yaml:156]
sn74hc595: sn74hc595_hub0
value must be at most 7.
number: 8 [source /config/esphome/dollshouse.yaml:157]
inverted: False
I’d post my device YAML in line, but there’s quite a lot of it. I will try to figure out how to attach it after posting this…
More to follow…
paul6502
(Paul Newbold)
2
substitutions:
device_name: dollshouse
esphome:
name: ${device_name}
platform: ESP32
board: nodemcu-32s
platformio_options:
platform: espressif32
board: az-delivery-devkit-v4
board_build.mcu: esp32
board_build.f_cpu: 240000000L
wifi:
ssid: !secret iot_wifi_ssid
password: !secret iot_wifi_pass
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dolls House"
password: !secret esphome_admin_pass
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
reboot_timeout: 15min
password: !secret esphome_admin_pass
ota:
password: !secret esphome_admin_pass
######################
# the web_server & sensor components can be removed without affecting core functionaility.
web_server:
port: 80
auth:
username: !secret esphome_dollshouse_user
password: !secret esphome_dollshouse_pass
sensor:
- platform: wifi_signal
name: "${device_name} - Wifi Signal Strength"
update_interval: 60s
- platform: uptime
name: "${device_name} - Uptime"
text_sensor:
- platform: version
hide_timestamp: true
name: "${device_name} - ESPHome Version"
- platform: wifi_info
ip_address:
name: "${device_name} - IP Address"
ssid:
name: "${device_name} - Connected SSID"
bssid:
name: "${device_name} - Connected BSSID"
mac_address:
name: "${device_name} - Mac Wifi Address"
#######################################
# Device specific Config Begins Below #
#######################################
sn74hc595:
- id: 'sn74hc595_hub0'
data_pin: GPIO2
clock_pin: GPIO3
latch_pin: GPIO4
# oe_pin: <PIN> # Not used
sr_count: 4
- id: 'sn74hc595_hub1'
data_pin: GPIO5
clock_pin: GPIO15
latch_pin: GPIO18
# oe_pin: <PIN> # Not used
sr_count: 2
# Individual outputs
switch:
- platform: gpio
name: ${device_name}_p0
id: ${device_name}_p0
pin:
sn74hc595: 'sn74hc595_hub0'
number: 0
inverted: False
- platform: gpio
name: ${device_name}_p1
id: ${device_name}_p1
pin:
sn74hc595: 'sn74hc595_hub0'
number: 1
inverted: False
- platform: gpio
name: ${device_name}_p2
id: ${device_name}_p2
pin:
sn74hc595: 'sn74hc595_hub0'
number: 2
inverted: False
- platform: gpio
name: ${device_name}_p3
id: ${device_name}_p3
pin:
sn74hc595: 'sn74hc595_hub0'
number: 3
inverted: False
- platform: gpio
name: ${device_name}_p4
id: ${device_name}_p4
pin:
sn74hc595: 'sn74hc595_hub0'
number: 4
inverted: False
- platform: gpio
name: ${device_name}_p5
id: ${device_name}_p5
pin:
sn74hc595: 'sn74hc595_hub0'
number: 5
inverted: False
- platform: gpio
name: ${device_name}_p6
id: ${device_name}_p6
pin:
sn74hc595: 'sn74hc595_hub0'
number: 6
inverted: False
- platform: gpio
name: ${device_name}_p7
id: ${device_name}_p7
pin:
sn74hc595: 'sn74hc595_hub0'
number: 7
inverted: False
- platform: gpio
name: ${device_name}_p8
id: ${device_name}_p8
pin:
sn74hc595: 'sn74hc595_hub0'
number: 8
inverted: False
- platform: gpio
name: ${device_name}_p9
id: ${device_name}_p9
pin:
sn74hc595: 'sn74hc595_hub0'
number: 9
inverted: False
- platform: gpio
name: ${device_name}_p10
id: ${device_name}_p10
pin:
sn74hc595: 'sn74hc595_hub0'
number: 10
inverted: False
- platform: gpio
name: ${device_name}_p11
id: ${device_name}_p11
pin:
sn74hc595: 'sn74hc595_hub0'
number: 11
inverted: False
- platform: gpio
name: ${device_name}_p12
id: ${device_name}_p12
pin:
sn74hc595: 'sn74hc595_hub0'
number: 12
inverted: False
- platform: gpio
name: ${device_name}_p13
id: ${device_name}_p13
pin:
sn74hc595: 'sn74hc595_hub0'
number: 13
inverted: False
- platform: gpio
name: ${device_name}_p14
id: ${device_name}_p14
pin:
sn74hc595: sn74hc595_hub0
number: 14
inverted: False
- platform: gpio
name: ${device_name}_p15
id: ${device_name}_p15
pin:
sn74hc595: 'sn74hc595_hub0'
number: 15
inverted: False
- platform: gpio
name: ${device_name}_p16
id: ${device_name}_p16
pin:
sn74hc595: 'sn74hc595_hub0'
number: 16
inverted: False
- platform: gpio
name: ${device_name}_p17
id: ${device_name}_p17
pin:
sn74hc595: 'sn74hc595_hub0'
number: 17
inverted: False
- platform: gpio
name: ${device_name}_p18
id: ${device_name}_p18
pin:
sn74hc595: sn74hc595_hub0
number: 18
inverted: False
- platform: gpio
name: ${device_name}_p19
id: ${device_name}_p19
pin:
sn74hc595: 'sn74hc595_hub0'
number: 19
inverted: False
- platform: gpio
name: ${device_name}_p20
id: ${device_name}_p20
pin:
sn74hc595: 'sn74hc595_hub0'
number: 20
inverted: False
- platform: gpio
name: ${device_name}_p21
id: ${device_name}_p21
pin:
sn74hc595: 'sn74hc595_hub0'
number: 21
inverted: False
- platform: gpio
name: ${device_name}_p22
id: ${device_name}_p22
pin:
sn74hc595: sn74hc595_hub0
number: 22
inverted: False
- platform: gpio
name: ${device_name}_p23
id: ${device_name}_p23
pin:
sn74hc595: 'sn74hc595_hub0'
number: 23
inverted: False
- platform: gpio
name: ${device_name}_p24
id: ${device_name}_p24
pin:
sn74hc595: 'sn74hc595_hub0'
number: 24
inverted: False
- platform: gpio
name: ${device_name}_p25
id: ${device_name}_p25
pin:
sn74hc595: 'sn74hc595_hub0'
number: 25
inverted: False
- platform: gpio
name: ${device_name}_p26
id: ${device_name}_p26
pin:
sn74hc595: 'sn74hc595_hub0'
number: 26
inverted: False
- platform: gpio
name: ${device_name}_p27
id: ${device_name}_p27
pin:
sn74hc595: 'sn74hc595_hub0'
number: 27
inverted: False
- platform: gpio
name: ${device_name}_p28
id: ${device_name}_p28
pin:
sn74hc595: 'sn74hc595_hub0'
number: 28
inverted: False
- platform: gpio
name: ${device_name}_p29
id: ${device_name}_p29
pin:
sn74hc595: sn74hc595_hub0
number: 29
inverted: False
- platform: gpio
name: ${device_name}_p30
id: ${device_name}_p30
pin:
sn74hc595: 'sn74hc595_hub0'
number: 30
inverted: False
- platform: gpio
name: ${device_name}_p31
id: ${device_name}_p31
pin:
sn74hc595: 'sn74hc595_hub0'
number: 31
inverted: False
- platform: gpio
name: ${device_name}_p32
id: ${device_name}_p32
pin:
sn74hc595: 'sn74hc595_hub1'
number: 0
inverted: False
- platform: gpio
name: ${device_name}_p33
id: ${device_name}_p33
pin:
sn74hc595: 'sn74hc595_hub1'
number: 1
inverted: False
- platform: gpio
name: ${device_name}_p34
id: ${device_name}_p34
pin:
sn74hc595: 'sn74hc595_hub1'
number: 2
inverted: False
- platform: gpio
name: ${device_name}_p35
id: ${device_name}_p35
pin:
sn74hc595: 'sn74hc595_hub1'
number: 3
inverted: False
- platform: gpio
name: ${device_name}_p36
id: ${device_name}_p36
pin:
sn74hc595: 'sn74hc595_hub1'
number: 4
inverted: False
- platform: gpio
name: ${device_name}_p37
id: ${device_name}_p37
pin:
sn74hc595: 'sn74hc595_hub1'
number: 5
inverted: False
- platform: gpio
name: ${device_name}_p38
id: ${device_name}_p38
pin:
sn74hc595: 'sn74hc595_hub1'
number: 6
inverted: False
- platform: gpio
name: ${device_name}_p39
id: ${device_name}_p39
pin:
sn74hc595: 'sn74hc595_hub1'
number: 7
inverted: False
- platform: gpio
name: ${device_name}_p40
id: ${device_name}_p40
pin:
sn74hc595: 'sn74hc595_hub1'
number: 8
inverted: False
- platform: gpio
name: ${device_name}_p41
id: ${device_name}_p41
pin:
sn74hc595: 'sn74hc595_hub1'
number: 9
inverted: False
- platform: gpio
name: ${device_name}_p42
id: ${device_name}_p42
pin:
sn74hc595: 'sn74hc595_hub1'
number: 10
inverted: False
- platform: gpio
name: ${device_name}_p43
id: ${device_name}_p43
pin:
sn74hc595: 'sn74hc595_hub1'
number: 11
inverted: False
- platform: gpio
name: ${device_name}_p44
id: ${device_name}_p44
pin:
sn74hc595: 'sn74hc595_hub1'
number: 12
inverted: False
- platform: gpio
name: ${device_name}_p45
id: ${device_name}_p45
pin:
sn74hc595: 'sn74hc595_hub1'
number: 13
inverted: False
- platform: gpio
name: ${device_name}_p46
id: ${device_name}_p46
pin:
sn74hc595: 'sn74hc595_hub1'
number: 14
inverted: False
- platform: gpio
name: ${device_name}_p47
id: ${device_name}_p47
pin:
sn74hc595: 'sn74hc595_hub1'
number: 15
inverted: False
- platform: template
name: ${device_name}_red
id: ${device_name}_red
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_red
state: ON
- switch.turn_on: ${device_name}_p0
- switch.turn_on: ${device_name}_p4
- switch.turn_on: ${device_name}_p8
- switch.turn_on: ${device_name}_p12
- switch.turn_on: ${device_name}_p16
- switch.turn_on: ${device_name}_p20
- switch.turn_on: ${device_name}_p24
- switch.turn_on: ${device_name}_p28
- switch.turn_on: ${device_name}_p32
- switch.turn_on: ${device_name}_p36
- switch.turn_on: ${device_name}_p40
- switch.turn_on: ${device_name}_p44
turn_off_action:
- switch.template.publish:
id: ${device_name}_red
state: OFF
- switch.turn_off: ${device_name}_p0
- switch.turn_off: ${device_name}_p4
- switch.turn_off: ${device_name}_p8
- switch.turn_off: ${device_name}_p12
- switch.turn_off: ${device_name}_p16
- switch.turn_off: ${device_name}_p20
- switch.turn_off: ${device_name}_p24
- switch.turn_off: ${device_name}_p28
- switch.turn_off: ${device_name}_p32
- switch.turn_off: ${device_name}_p36
- switch.turn_off: ${device_name}_p40
- switch.turn_off: ${device_name}_p44
- platform: template
name: ${device_name}_green
id: ${device_name}_green
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_green
state: ON
- switch.turn_on: ${device_name}_p1
- switch.turn_on: ${device_name}_p5
- switch.turn_on: ${device_name}_p9
- switch.turn_on: ${device_name}_p13
- switch.turn_on: ${device_name}_p17
- switch.turn_on: ${device_name}_p21
- switch.turn_on: ${device_name}_p25
- switch.turn_on: ${device_name}_p29
- switch.turn_on: ${device_name}_p33
- switch.turn_on: ${device_name}_p37
- switch.turn_on: ${device_name}_p41
- switch.turn_on: ${device_name}_p45
turn_off_action:
- switch.template.publish:
id: ${device_name}_green
state: OFF
- switch.turn_off: ${device_name}_p1
- switch.turn_off: ${device_name}_p5
- switch.turn_off: ${device_name}_p9
- switch.turn_off: ${device_name}_p13
- switch.turn_off: ${device_name}_p17
- switch.turn_off: ${device_name}_p21
- switch.turn_off: ${device_name}_p25
- switch.turn_off: ${device_name}_p29
- switch.turn_off: ${device_name}_p33
- switch.turn_off: ${device_name}_p37
- switch.turn_off: ${device_name}_p41
- switch.turn_off: ${device_name}_p45
- platform: template
name: ${device_name}_blue
id: ${device_name}_blue
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_blue
state: ON
- switch.turn_on: ${device_name}_p2
- switch.turn_on: ${device_name}_p6
- switch.turn_on: ${device_name}_p10
- switch.turn_on: ${device_name}_p14
- switch.turn_on: ${device_name}_p18
- switch.turn_on: ${device_name}_p22
- switch.turn_on: ${device_name}_p26
- switch.turn_on: ${device_name}_p30
- switch.turn_on: ${device_name}_p34
- switch.turn_on: ${device_name}_p38
- switch.turn_on: ${device_name}_p42
- switch.turn_on: ${device_name}_p46
turn_off_action:
- switch.template.publish:
id: ${device_name}_blue
state: OFF
- switch.turn_off: ${device_name}_p2
- switch.turn_off: ${device_name}_p6
- switch.turn_off: ${device_name}_p10
- switch.turn_off: ${device_name}_p14
- switch.turn_off: ${device_name}_p18
- switch.turn_off: ${device_name}_p22
- switch.turn_off: ${device_name}_p26
- switch.turn_off: ${device_name}_p30
- switch.turn_off: ${device_name}_p34
- switch.turn_off: ${device_name}_p38
- switch.turn_off: ${device_name}_p42
- switch.turn_off: ${device_name}_p46
- platform: template
name: ${device_name}_yellow
id: ${device_name}_yellow
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_yellow
state: ON
- switch.turn_on: ${device_name}_p3
- switch.turn_on: ${device_name}_p7
- switch.turn_on: ${device_name}_p11
- switch.turn_on: ${device_name}_p15
- switch.turn_on: ${device_name}_p19
- switch.turn_on: ${device_name}_p23
- switch.turn_on: ${device_name}_p27
- switch.turn_on: ${device_name}_p31
- switch.turn_on: ${device_name}_p35
- switch.turn_on: ${device_name}_p39
- switch.turn_on: ${device_name}_p43
- switch.turn_on: ${device_name}_p47
turn_off_action:
- switch.template.publish:
id: ${device_name}_yellow
state: OFF
- switch.turn_off: ${device_name}_p3
- switch.turn_off: ${device_name}_p7
- switch.turn_off: ${device_name}_p11
- switch.turn_off: ${device_name}_p15
- switch.turn_off: ${device_name}_p19
- switch.turn_off: ${device_name}_p23
- switch.turn_off: ${device_name}_p27
- switch.turn_off: ${device_name}_p31
- switch.turn_off: ${device_name}_p35
- switch.turn_off: ${device_name}_p39
- switch.turn_off: ${device_name}_p43
- switch.turn_off: ${device_name}_p47
- platform: template
name: ${device_name}_reg1
id: ${device_name}_reg1
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_reg1
state: ON
- switch.turn_on: ${device_name}_p0
- switch.turn_on: ${device_name}_p1
- switch.turn_on: ${device_name}_p2
- switch.turn_on: ${device_name}_p3
- switch.turn_on: ${device_name}_p4
- switch.turn_on: ${device_name}_p5
- switch.turn_on: ${device_name}_p6
- switch.turn_on: ${device_name}_p7
- switch.turn_on: ${device_name}_p8
- switch.turn_on: ${device_name}_p9
turn_off_action:
- switch.template.publish:
id: ${device_name}_reg1
state: OFF
- switch.turn_off: ${device_name}_p0
- switch.turn_off: ${device_name}_p1
- switch.turn_off: ${device_name}_p2
- switch.turn_off: ${device_name}_p3
- switch.turn_off: ${device_name}_p4
- switch.turn_off: ${device_name}_p5
- switch.turn_off: ${device_name}_p6
- switch.turn_off: ${device_name}_p7
- switch.turn_off: ${device_name}_p8
- switch.turn_off: ${device_name}_p9
- platform: template
name: ${device_name}_reg2
id: ${device_name}_reg2
lambda: |-
return {};
turn_on_action:
- switch.template.publish:
id: ${device_name}_reg2
state: ON
- switch.turn_on: ${device_name}_p10
- switch.turn_on: ${device_name}_p11
- switch.turn_on: ${device_name}_p12
- switch.turn_on: ${device_name}_p13
- switch.turn_on: ${device_name}_p14
- switch.turn_on: ${device_name}_p15
- switch.turn_on: ${device_name}_p16
- switch.turn_on: ${device_name}_p17
- switch.turn_on: ${device_name}_p18
- switch.turn_on: ${device_name}_p19
turn_off_action:
- switch.template.publish:
id: ${device_name}_reg2
state: OFF
- switch.turn_off: ${device_name}_p10
- switch.turn_off: ${device_name}_p11
- switch.turn_off: ${device_name}_p12
- switch.turn_off: ${device_name}_p13
- switch.turn_off: ${device_name}_p14
- switch.turn_off: ${device_name}_p15
- switch.turn_off: ${device_name}_p16
- switch.turn_off: ${device_name}_p17
- switch.turn_off: ${device_name}_p18
- switch.turn_off: ${device_name}_p19
paul6502
(Paul Newbold)
3
Just posting here for completeness. ESPhome is now 2021.10.3 and my YAML now compiles.