It would seem logical to name them for where they are and what they do. “Bathroom motion sensor”, “Bedroom lamp”, etc. However, I’ve found that, if it can move, it ends up moving sooner or later. My “bathroom” motion sensor is now in the upstairs family room, for example.

  • spitfire@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    13 hours ago

    I do exact that and rarely move stuff. When I do I rename it. Most of the stuff I have is Zigbee, so I rename it in Zigbee2MQTT, select the option to rename it in HA too.

  • Claude Flammang@dju.social
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    @early_riser
    Considering the fact that just like Apple Home, HA dashboards strip the first part of the display name if it’s identical to the area name, I use the „area device“ convention. So „Bathroom Leak Moisture“ is displayed as „Leak Moisture“ under the area „Bathroom“.
    Furthermore HA allows to recreate entity Ids after renaming a device resulting in: „binary_sensor.bathroom_leak_moisture“.
    So if I move my sensor to another location, I simply rename it to „Attic Leak „.

    • Joelk111@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      Yeah, if they’re moved I’ll likely want them to perform different automations and such, so I just completely delete tte device and re-set it up.

    • Ŝan@piefed.zip
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      10
      ·
      2 days ago

      I have some devices like þis, and þey cause confusion. Þe underlying IDs don’t change, so þe device is named “Upstairs”, but þe ID in all automations is still “sensor.garage_door” or someþing.

        • Ŝan@piefed.zip
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          8
          ·
          2 days ago

          Can you do þis in HA wiþout having to change every Automation and script?

          • Lka1988@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            19 hours ago

            Depends how it’s implemented.

            For example: I’m in the process of replacing my Wyze wifi bulbs with ThirdReality Zigbee bulbs (only 3 left to swap).

            What I do is remove the Wyze bulb from the Wyze app, then go into HA and refresh the Wyze integration which removes the bulb’s entities from HA. Then I’ll do the physical replacement, pair the Zigbee bulb with HA, give it the exact same name as the Wyze bulb (this is key), then go check the automation(s). Haven’t had any issues with that so far.

          • limelight79@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 days ago

            I use a helper for some entities. For example, the temperature sensors that come in via rtl_433 that rename every time I put new batteries in, or my phone or my wife’s phone. That way I only have to change the helper, in one place, versus having to change it in countless scripts, scenes, buttons, etc.

  • unknowing8343@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    Entities I strongly recommend naming them like this:

    {location}_{type}
    

    For example

    main_bedroom_temperature
    

    This way if you change devices, you can swap entity names and everything works. Also YAML code is much easier to read and write.

    Devices? That’s more difficult to name, but also way less important, IMO. Usually I try to follow the same scheme as for entities, but sometimes I just prefer something else, like the actual brand, date of install…

  • Worx@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    I name them James and Bob, then immediately forget which is which and get confused.

    … you may wish to use a different strategy

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 days ago

    Generally, and for a number of different reasons, it’s best to disassociate a device that is meant to be permanent and re-pair with HA. There’s a whole lot of automation in the background that goes into pairing a device, or setting up schedules, automations, scenes, scripts …etc. Deleting forces a find/clear on that entity, and re-pairing creates clean new entries.

    • Acamon@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      Yeah, I was confused about some lamp always being on when I woke up, and realised I’d replaced it’s smart socket with one that had previously been used for a coffee machine. Deleting and repairing sounds like wisdom.

  • excursion22@piefed.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    I went with <function>_<room>. So like motion_garage, or door_office. The function of the device won’t change, so it seemed logical to have it in that order.

    It’s also not hard to change names of devices in Zigbee2MQTT and propagate that through HA if a device moves.

  • CocaineShrimp@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    I separate the name from the ID, so the IDs are relative to the specific device only, and the names represent the device and location.

    I’ve set the IDs for all my sensors to use a code. The letters identify the type of sensor, and the numbers are sequential when I got them. I also have a label maker and labeled all the devices with their codes.

    Example:

    AA##
    

    So my first temperature sensor is

    TS01
    

    Then the name of the sensor is a little more elaborate, where it includes the type of the sensor, the code, and the location.

    {Type} {ID} - {Location}
    

    So my bedroom motion sensor is:

    Motion MS02 - Bedroom
    

    Then if I have to rearrange anything, I don’t update the device ID, just the name and how it’s used.

    I recently moved and had to rearrange some of the devices. It wasn’t as bad as it could have been as I tried sticking the sensors in the proper rooms (ie all the old bedroom devices stayed in the bedroom). But there were some cases where I did have to rename them & update the integrations.

  • shortwavesurfer@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    i use a code like “nbrnw1” for like outlets and “nbrnw1&2” if its a dual outlet plug. Its a room code “nbr” and where/what device is, in this case “nelw” means "north wall. So “nbrnw1” is an outlet on the north wall of the north bedroom. “Ksw1” would be an outlet on the south wall of the kitchen.

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 days ago

    You can rename them later no? I name them after the sensor, and rely on the location field. But in esphome they are named location-sensor.

  • fruitycoder@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    I name them like the story about them … Its surely unsustanble but 12 nodes and three iot devices and it’s still going strong

    The AC is MrColdMizer The PC of cobled spare PC part is TheResurection One laptop is Wapwop and Gamer1 Etc, etc

    I then use labels to keep track of conditionals like location, circuits, functions, etc

  • bastion@feddit.nl
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    If I’m moving the device, then it’s not going to have the same automatons and such, so I can just rename it if I move it.

    That allows me to use a really consistent naming scheme: Pump, Freezer, Electric Fence, Basement_room_1_lock, basement_room_1_electrics, basement_room1_ai_taunts_voice, Gerold, Hermione, Sir_Snuffalot, Misc_1, Misc_2, Misc_3, Misc_4, basement_hallway_motion_alarm, etc.

  • Manapany@jlai.lu
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    I use room_object. It’s easier to find the to make automation and for my dashboard. I tried not to moove them to much and I don’t have a lot of object so it is fine. Most of them don’t moove anyway, lightbulb, vacuum, speaker. (I messed up at the beginning with the naming of my light by not naming them correctly and it is an error that I still have to deal with. (And it’s a pain in the ass)