jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
198 stars 47 forks source link

Capitalize appended attribute name if original name is capitalized #138

Closed amosyuen closed 3 years ago

jason0x43 commented 3 years ago

Hmm... I feel like not capitalizing the attribute provides some distinction between the attribute and device name.

amosyuen commented 3 years ago

Rebuttal points:

  1. I don't think it's particularly hard to differentiate a capitalized attribute. For example for something long like "Master Bedroom Motion Sensor Last Update Time", it seems fairly clear to me that "Last Update Time" is the attribute. And you can always look at the device associated with the entity if you really want to differentitate the device from the entity.
  2. Majority of official integrations I've used append capital words for attributes. Examples:
    • Eight Sleep generates entities like "Bed Battery"
    • Home Assistant Android App creates a device for your phone with entities like "Galaxy Battery Level"
    • Ecobee generates entities like "Ecobee Thermostat Motion"
    • Neato generates entities like "Robot Battery"
jason0x43 commented 3 years ago

Fair points. I'll test this and merge it later this week.

jason0x43 commented 3 years ago

Sorry, I forgot about this after I got back from vacation. The idea seems fine, but I think it could potentially be simplified a bit.

amosyuen commented 3 years ago

I pushed changes to use title() all the time instead