1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Improve error checking: too many component id candidates (#1570)

* add error too many candidates

* Improve error checking of ids
This commit is contained in:
Guillermo Ruffino
2021-03-07 19:59:32 -03:00
committed by GitHub
parent 570ec36fe3
commit d5cf4b7eac
4 changed files with 68 additions and 25 deletions

View File

@@ -144,9 +144,13 @@ mqtt:
- uart.write:
id: uart0
data: Hello World
- uart.write: [0x00, 0x20, 0x30]
- uart.write: !lambda |-
return {};
- uart.write:
id: uart0
data: [0x00, 0x20, 0x30]
- uart.write:
id: uart0
data: !lambda |-
return {};
i2c:
sda: 21
@@ -469,7 +473,7 @@ sensor:
name: 'HLW8012 Power'
id: hlw8012_power
energy:
name: "HLW8012 Energy"
name: 'HLW8012 Energy'
id: hlw8012_energy
update_interval: 15s
current_resistor: 0.001 ohm
@@ -583,6 +587,7 @@ sensor:
reference_resistance: '430 Ω'
rtd_nominal_resistance: '100 Ω'
- platform: mhz19
uart_id: uart0
co2:
name: 'MH-Z19 CO2 Value'
temperature:
@@ -648,25 +653,27 @@ sensor:
name: Pulse Width
pin: GPIO12
- platform: senseair
uart_id: uart0
co2:
name: 'SenseAir CO2 Value'
update_interval: 15s
- platform: sm300d2
uart_id: uart0
co2:
name: "SM300D2 CO2 Value"
name: 'SM300D2 CO2 Value'
formaldehyde:
name: "SM300D2 Formaldehyde Value"
name: 'SM300D2 Formaldehyde Value'
tvoc:
name: "SM300D2 TVOC Value"
name: 'SM300D2 TVOC Value'
pm_2_5:
name: "SM300D2 PM2.5 Value"
name: 'SM300D2 PM2.5 Value'
pm_10_0:
name: "SM300D2 PM10 Value"
name: 'SM300D2 PM10 Value'
temperature:
name: "SM300D2 Temperature Value"
name: 'SM300D2 Temperature Value'
humidity:
name: "SM300D2 Humidity Value"
update_interval: 60s
name: 'SM300D2 Humidity Value'
update_interval: 60s
- platform: sht3xd
temperature:
name: 'Living Room Temperature 8'
@@ -785,6 +792,7 @@ sensor:
root["key"] = id(the_sensor).state;
root["greeting"] = "Hello World";
- platform: sds011
uart_id: uart0
pm_2_5:
name: 'SDS011 PM2.5'
pm_10_0:
@@ -834,6 +842,7 @@ sensor:
name: 'AQI'
calculation_type: 'CAQI'
- platform: teleinfo
uart_id: uart0
tags:
- tag_name: 'HCHC'
sensor:
@@ -1007,6 +1016,7 @@ binary_sensor:
id: gpio_19
frequency: !lambda 'return 500.0;'
- platform: pn532
pn532_id: pn532_bs
uid: 74-10-37-94
name: 'PN532 NFC Tag'
- platform: rdm6300
@@ -1518,7 +1528,7 @@ switch:
turn_on_action:
remote_transmitter.transmit_samsung36:
address: 0x0400
command: 0x000E00FF
command: 0x000E00FF
- platform: template
name: Sony
turn_on_action:
@@ -1653,12 +1663,15 @@ switch:
id: my_switch
state: !lambda 'return false;'
- platform: uart
uart_id: uart0
name: 'UART String Output'
data: 'DataToSend'
- platform: uart
uart_id: uart0
name: 'UART Bytes Output'
data: [0xDE, 0xAD, 0xBE, 0xEF]
- platform: uart
uart_id: uart0
name: 'UART Recurring Output'
data: [0xDE, 0xAD, 0xBE, 0xEF]
send_every: 1s
@@ -1774,6 +1787,7 @@ display:
lambda: |-
it.print("1234");
- platform: nextion
uart_id: uart0
lambda: |-
it.set_component_value("gauge", 50);
it.set_component_text("textview", "Hello World!");
@@ -1901,6 +1915,7 @@ status_led:
pin: GPIO2
pn532_spi:
id: pn532_bs
cs_pin: GPIO23
update_interval: 1s
on_tag:
@@ -1913,6 +1928,7 @@ pn532_spi:
pn532_i2c:
rdm6300:
uart_id: uart0
rc522_spi:
cs_pin: GPIO23
@@ -1928,6 +1944,7 @@ rc522_i2c:
ESP_LOGD("main", "Found tag %s", x.c_str());
gps:
uart_id: uart0
time:
- platform: sntp

View File

@@ -197,10 +197,6 @@ uart:
rx_pin: GPIO3
baud_rate: 115200
- id: adalight_uart
rx_pin: GPIO3
baud_rate: 115200
ota:
safe_mode: True
port: 3286
@@ -814,7 +810,6 @@ light:
effects:
- wled:
- adalight:
uart_id: adalight_uart
- e131:
universe: 1
- platform: hbridge