Allow forcing lower-casing of entity ids.
See original GitHub issueSome devices append a .Battery_State
while some append .battery_state
.
This could be reconciled by forcing lower-case, and/or a separate mapping output that is forced into a lower-case state.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
java - Spring boot JPA insert in TABLE with uppercase name ...
AUTO) private int id; ..... When i try to insert new record in database, the table name was translated in lowercase as :...
Read more >Allow configuration for migrations to specify case for indexes ...
I often run into cases in migrations where they try to rename an index or foreign key to be uppercase even if the...
Read more >PostgreSQL auto-converts column names into lowercase
Problem PostgreSQL converts all table column names into lowercase, unless quoted. Goal Retain letter-casing of table column names.
Read more >PostgreSQL force upper case for all data
Generally, you need UPPER CASE for displaying the data to the end user. If so,. STEP 1: identify the tables & columns and...
Read more >Collations and case sensitivity - EF Core - Microsoft Learn
Configuring collations and case-sensitivity in the database and on queries with Entity Framework Core.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I’ve had a hard time balancing the configuration options here (easy vs. highly customizable). We could of course support both, but I was trying to converge on a set of config options that would satisfy most folks, most of the time.
That being said, I don’t really envision folks wanting to force lower case for some entities, but not others. Perhaps an all-or-nothing config would be better in this case.
Yes, they are stored as
keyword
today, but I don’t see a reason why we couldn’t/shouldn’t also store as.text
:https://github.com/legrego/homeassistant-elasticsearch/blob/e25f33250c2e7ac4b966a826d8c2900b4c0eb894/custom_components/elastic/index_mapping.json#L15-L18
Hard to argue about backward compatibility. I think the principle of least astonishment implies we shouldn’t change it.
However, what if we alter the mapping to make it a separate field of the parent mapping?
entity_id.lower
? orentity_id.downcase
?