Skip to content

This plugin automatically generates images for all light combinations in a SweetHome3D scene in order to use it in Home Assistant picture elements card.

License

Notifications You must be signed in to change notification settings

MaloPolese/sweethome3d-light-combinations-plugin

Repository files navigation

SweetHome3D Light Combinations Plugin

GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Downloads (all assets, all releases)

Logo

This plugin automatically generates images for all light combinations in a SweetHome3D scene. Users can select which lights to include in the combinations, adjust the power level of each light, and name the lights. The generated names are used to create configurations compatible with the Home Assistant Picture Elements card.

Features

  • Light Selection: Choose which lights to include in the generated combinations.
  • Power Adjustment: Configure the power level of each light.
  • Naming: Name the lights, which will be used in generating configurations for Home Assistant.
  • Home Assistant Integration: Create ready-to-use configurations for the Picture Elements card.

light_selection_step image_generation_step

Requirements

  • SweetHome3D: Version 7.5 or compatible.
  • Java: Required to run SweetHome3D via CLI (if the plugin doesn't show up in the installer version on Windows).

Installation

Download the latest release (.jar) from the releases page and follow the instructions below.

Place the JAR file in the following plugin folder depending on your OS:

  • Windows 11 / 10 / 8 / 7 / Vista: C:\Users\user\AppData\Roaming\eTeks\Sweet Home 3D\plugins
  • Windows XP and older: C:\Documents and Settings\user\Application Data\eTeks\Sweet Home 3D\plugins
  • macOS: ~/Library/Application Support/eTeks/Sweet Home 3D/plugins
  • Linux/Unix: ~/.eteks/sweethome3d/plugins

Start SweetHome3D and the plugin should appear in the Tools menu.

Usage

Once installed, open SweetHome3D and the plugin should appear in the Tools menu. Select the lights you want to include in the combinations, adjust their power levels, and give each light a name. The plugin will then generate images for all possible combinations of the selected lights.

plugin_menu

Home Assistant Integration

Once the image generation is complete, the plugin will add all the generated images and a home_assistant_config.yaml file in the folder previously selected. To use the generated results in Home Assistant, follow these steps:

Steps to Integrate with Home Assistant

  1. Copy Images:

    • Copy all the generated images to your Home Assistant instance's www/plans/ folder. If the folder doesn't exist, create it first.

    For example:

    www/plans/
    ├── ha-generated-0.jpg
    ├── ha-generated-1.jpg
    └── ...
  2. Create a Picture Elements Card:

    • In your Home Assistant dashboard, create a new "Picture Elements" card.
    • Open the home_assistant_config.yaml file, which was generated alongside the images.
    • Copy the configuration from home_assistant_config.yaml and paste it into the Picture Elements card configuration in Home Assistant.

Now, you should have a fully functional Picture Elements card displaying all the light combinations generated by the plugin!

  1. Optional:
    • You can refresh the home assistant configuration

Credit

This project was inspired by the work of @sergiocasero and his project sweet_home_3d_ha_lightning.

About

This plugin automatically generates images for all light combinations in a SweetHome3D scene in order to use it in Home Assistant picture elements card.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages