shmuelzon / home-assistant-floor-plan

Home Assistant Floor Plan Generator Plugin For Sweet Home 3D
MIT License
129 stars 4 forks source link

Allow setting a state-icon's title #42

Closed guimatheus92 closed 4 days ago

guimatheus92 commented 1 week ago

Based on your last review, I have added a new feature, improved the documentation, and followed your suggestions.

New feature added:

The Title key-value in the.yaml file can now be filled by the user in the description field within the SH3D project. If the user has not provided any information in that field, the Title will remain empty. This ensures that every time a new file is generated, the data will be saved in the project.

SH3D:

image

YAML:

  - type: state-icon
    entity: switch.kitchen_4
    title: Light Kitchen
    style:
      top: 70.37%
      left: 65.07%
      border-radius: 50%
      text-align: center
      background-color: rgba(255, 255, 255, 0.3)
    tap_action:
      action: toggle

Without description:

  - type: state-icon
    entity: switch.kitchen_3
    title: null
    style:
      top: 85.06%
      left: 69.99%
      border-radius: 50%
      text-align: center
      background-color: rgba(255, 255, 255, 0.3)
    tap_action:
      action: toggle
shmuelzon commented 4 days ago

Hey, I took the liberty to remove the changes not relevant to the title feature and cleaned up the code a bit. I hope that's OK. I though it would be faster than a CR ping-pong.

Thanks!

BTW - Should you need them, all of your original changes are attached here: all_changes.patch

guimatheus92 commented 4 days ago

Hey, I took the liberty to remove the changes not relevant to the title feature and cleaned up the code a bit. I hope that's OK. I though it would be faster than a CR ping-pong.

Thanks!

BTW - Should you need them, all of your original changes are attached here: all_changes.patch

Sure, no problem! What about the contributing and other important stuff that we talked last time. Should I create another PR just for that?

shmuelzon commented 4 days ago

Yes, please. Each PR should include one thing. We can create a single PR for all the documentation issues that can include the README, CONTRIBUTING and PULL_REQUEST