Alias names for sensors

yes

yes

1 Like

light-groups are really cool :slight_smile:

im a relative newbie to HA but, based on our experience so far am basing our (future) product-range on it ! smashing software - do you think 'misā€™using groups in this way is useful? do we NEED an alternative ? what benefits could it have ? (mainly for products BASED on HA but also for DIY use to make replacing components straight-forward > thanks

Itā€™s not really miss-use, but itā€™s also definitely not needed. You can rename any devices entity_id without changing the device itself. If you have to replace the device, remove the old device, add the new device, rename the new device to the old device. Done. You donā€™t have to update any yaml files or automations unless you used a device trigger or device action.

Thereā€™s no reason for this extra layer of abstraction, it serves no purpose.

1 Like

what about where we have 100 appliances to ship ā€¦ where the four lights.xyz are different for each product ā€¦ we have each entities-ID is a spread-sheet ā€¦ and can import that into a ā€˜groups.yamlā€™ file to automate the matching of ā€˜light.L1ā€™ to its actual entity (then discover the devices ā€¦ automatically allocated to the correct L1/L2/L3/L4) - advice appreciated

Just rename themā€¦ If you want to do it automatically, adjust the .storage files when HA is off. If the lights come from yaml, just rename them in the yaml.

so we can import a ā€˜devices.yamlā€™ which MAPS L1/L2/L3/L4 to each different product entity.xyz ? we cant - ideally - be doing that by hand ā€¦ if weā€™re setting up a ā€˜homeā€™ thats cool ā€¦ if weā€™re setting up 100 or 1000 ā€˜homesā€™ itā€™ll add to our ā€˜productionā€™ time/effort/cost ??

would you mind explaining that in a bit more detail / example ? thanks

Find the integration that youā€™re using to create the lights, search the core.entity_registry in the storage folder for your lights, and change the entity_id in the file. Youā€™re not giving me enough info about your lights to further help. Youā€™re focused on the ā€˜mapā€™ instead of the built in ways to update entity_ids. Thereā€™s no way to map an entity_id to an alias via yaml, drop that line of thought.

so if - e.g. we use the config.yaml:

# Example configuration.yaml entry
light:
  - platform: group
    name: "L1"
    entities:
      - entity ā€œlight.gu10_light_xyz"
    name: "L2"
    entities:
      - entity ā€œlight.gu10_light_abc"

sort of thing ??

i cant actually find a ā€˜groups.yamlā€™ file !! but i should be able to !

Iā€™m sorry, but youā€™re all over the place.

  1. What integration are you using?
  2. How are you configuring the lights for said integration?

hi Petro, Iā€™m amazed that youā€™re helping us so quickly to be honest, thank you ā€¦ letā€™s take a birds-eye view ā€¦

Iā€™m using (say 100-off) box standard Pi4ā€™s + HA as the OS ā€¦ imagine we have 100 PI4ā€™s - one for each ā€˜productā€™ / ā€˜customerā€™ ā€¦ that weā€™re shipping to 100 customers ā€¦ so we need to set-up EACH product with itā€™s OWN set of 4 TUYA led-ccts ā€¦ (so this is NOT a setup for a single ā€˜homeā€™ at all - itā€™s a method for setting up 100 ā€˜homesā€™)

  • i need an efficient / simple / fast way of configuring EACH HA instance - all are identical - bar the entity-IDs of the bulbs

So each ā€˜instanceā€™ only references in itā€™s ā€˜codeā€™ ā€˜L1, L2, L3, L4ā€™ (etc) ā€¦ and we need to ā€˜mapā€™ the actual entity-IDs of the bulbs to L1, L2, etc for each product ā€¦

Am i making sense ? or have I lost the plot? Iā€™m new to HA but Iā€™ve been designing automatic control systems for the automotive-industry and railways for many years

I understand that HA was envisioned for the homes of 'DIYā€™ers ā€¦ Iā€™m looking to use it for APPLIANCES - lots of them - feedback very much appreciated

I understand your use case. I understand that you want to set it up automatically. Iā€™m trying to provide an answer, but you keep repeating the same thing instead of answering the questions Iā€™m asking. You do not need to repeat your use case again. I understand you want to mass deploy things. I understood it the first time. I am at the point of near maximum frustration because you arenā€™t actually answering anything.

so what do you suggest? what would you do?

THAT DEPENDS ON THE INTEGRATION.

Petro, please cut me some slack here - donā€™t get too frustrated ā€¦ iā€™ve swapped from node-red to HA 4-weeks back ā€¦ Iā€™m using the box-standard HA OS setup for a PI4 ā€¦ using TUYA (smart-life) integration

how am I configuring lights for said integration > atm we just ā€˜discoverā€™ lights in smartlife - then use the discovered entity-IDs to sort our automations - if missed your question pls explain

1 Like

TUYA does not have a yaml based onboarding process. So you have to go through the UI to add the devices. I.e. Thereā€™s no way to setup the TUYA without touching the UI. Meaning thereā€™s no way to quickly deploy 100ā€™s of HA installations in 1 go. During setup process, you can simply rename the devices (Which will rename the entity_ids), or use your light group ā€˜work aroundā€™. I donā€™t know why youā€™d bother with the light group work around when setting up TUYA would take longer than renaming 4 lights.

If you integrate lights via any YAML integration, you can apply a setup without even starting home assistant. This includes naming the devices and potentially adding a unique_id (depending on the integration). Both set the name of the entity_id.

i dont want to test your patience, so if you feel youā€™ve helped enough please do say ā€¦ my current approach is as follows - if you think this can be faster / easier perhaps you have an example links that may help us?

  1. we have a fully working PI4-HA ā€˜applianceā€™ 001with 20 actuators/sensors - save to backup ā€˜ha-001ā€™ā€¦
  2. power up appliance 002 ā€¦ restore from backup ā€¦ save as ā€˜ha-002ā€™
  3. we have an automatically produced configuration.yaml file where entity-IDs are mapped to the standard simple names (entity-IDs are retrieved from our data-base of components)
  4. that config-file is applied to Pi4-HA appliance - tested - saved
  5. rinse and repeat for the 100 appliances

many thanks