esphome-docs
esphome-docs copied to clipboard
"name" not required
Does not seem like "name" is required and it is not mentioned in example 2.
Description:
The documentation for a home assistant text sensor, mentions that "name" is a required configuration parameter. On the same page, there is an example given without "name". Also when I test a configuration without "name", it still works fine. So I remove "required" from "name" on this doc.
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable): esphome/esphome#<esphome PR number goes here>
Checklist:
- [ ] Branch:
next
is for changes and new documentation that will go public with the next ESPHome release. Fixes, changes and adjustments for the current release should be created againstcurrent
. - [ ] Link added in
/index.rst
when creating new documents for new components or cookbook.
Deploy Preview for esphome ready!
Name | Link |
---|---|
Latest commit | 79960466f326053aad39e99557bd622965d872a8 |
Latest deploy log | https://app.netlify.com/sites/esphome/deploys/6367c20dc2c0040008c9afe6 |
Deploy Preview | https://deploy-preview-2291--esphome.netlify.app/components/text_sensor/homeassistant |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
You should mark it optional, like attribute is.
Now that we are here, shouldn't this page indicate that someone should give this sensor an id so it can be used in other automations / conditions?
name is only useful if you want to forward this thing to say web server or mqtt I guess... never tried though.
and of course the same applies to other Home Asisstant ** things so this PR should keep consistency in case a change is applied
You should mark it optional, like attribute is.
Now that we are here, shouldn't this page indicate that someone should give this sensor an id so it can be used in other automations / conditions?
name is only useful if you want to forward this thing to say web server or mqtt I guess... never tried though.
and of course the same applies to other Home Asisstant ** things so this PR should keep consistency in case a change is applied
Sorry forgot about that. Name is now marked as optional.
From what i learned the name is being used for identify the component in Home Assistant. @scaarup, Are you saying that without setting the name property you still use the component?
From what i learned the name is being used for identify the component in Home Assistant. @scaarup, Are you saying that without setting the name property you still use the component?
Yeah it works fine without a "name". And I am only using the text_sensor's internally on the esp, so referring to them by id.