Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device name can not be uppercase #97

Open
palaueb opened this issue Apr 21, 2024 · 1 comment
Open

Device name can not be uppercase #97

palaueb opened this issue Apr 21, 2024 · 1 comment

Comments

@palaueb
Copy link

palaueb commented Apr 21, 2024

Expected Behavior

I'm able to write down any name and it handles it by the back.

Current Behavior

I have writen down the name "PRE" into the device name and it broke. Also, the error message is not shown, you need to copy the error message to be able to read it, it only shows 'INFO ESPHome 2023.11.4'.

Steps to Reproduce

Steps to reproduce the behavior:
Go to Devices
Create a new device
write an name that contains an uppercase letter (like 'PRE')
Click on Upload
Try to see error

Context (Environment)

  • Iridium hydroponics setup
  • OS: Windows 11
  • Browser: Firefox
  • Environment: dev

Issue demo

INFO ESPHome 2023.11.4

\033[1;31mesphome:\033[0m \033[36m[source /config/test.yaml:2]\033[0m
  \033[1;31m'P' is an invalid character for names. Valid characters are: abcdefghijklmnopqrstuvwxyz0123456789-_ (lowercase, no spaces).\033[0m
  name: PRE
INFO Reading configuration /config/test.yaml...
\033[1;31mFailed config\033[0m
\033[1;31mesphome:\033[0m \033[36m[source /config/test.yaml:2]\033[0m
  
  \033[1;31m'P' is an invalid character for names. Valid characters are: abcdefghijklmnopqrstuvwxyz0123456789-_ (lowercase, no spaces).\033[0m
  name: PRE
@palaueb
Copy link
Author

palaueb commented Apr 21, 2024

I have found more problems with names while uploading:

INFO ESPHome 2023.11.4
INFO Reading configuration /config/test.yaml...
INFO Updating https://github.com/u-fire/ESPHomeComponents/@None
\033[1;31mFailed config\033[0m

  name: PH+
  
  id: Producte A
  restore_mode: ALWAYS_OFF
\033[1;31mswitch.gpio:\033[0m \033[36m[source /config/test.yaml:24]\033[0m
  platform: gpio
  id: Producte D
  restore_mode: ALWAYS_OFF
  platform: gpio
  pin: 16
  id: Producte C
  restore_mode: ALWAYS_OFF
            return atoi(x.c_str());
        - switch.turn_off: LEDs
      topic: devices/pre/switch/PH+/pulsed_on
      \033[31mthen: \033[0m
        - delay: !lambda |-
            return atoi(x.c_str());
        - switch.turn_off: PH+
    - topic: devices/pre/switch/Producte A/pulsed_on
            return atoi(x.c_str());
        - switch.turn_off: Producte A
    - topic: devices/pre/switch/PH-/pulsed_on
      then: 
        - switch.turn_on: PH-
            return atoi(x.c_str());
        - switch.turn_on: Producte C
  port: 1883

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant