This project is a web application designed to help users manage their Home Assistant devices and mappings, focusing on creating virtual three-way switch setups and virtual parallel switch setups through Node-RED. The application allows users to independently manage their own device configurations and mappings.
Device Management:
Mapping Management:
Configuration Management:
node-red-homeassistant-three-way/
├── .dockerignore
├── .gitignore
├── config.py
├── config.yaml
├── CONTRIBUTING.md
├── devices.csv
├── Dockerfile
├── mappings.csv
├── README.md
├── requirements.txt
├── run.py
├── tests
│ └── unit_tests
│ └── test_functions.py
├── scripts
│ ├── check_mapping.py
│ ├── get_ha_devices_entities.py
│ └── main.py
└── app
├── routes.py
├── __init__.py
├── templates
│ ├── devices.html
│ ├── index.html
│ ├── mappings.html
│ └── settings.html
└── static
├── favicon.ico
├── scripts.js
└── styles.css
Clone the Repository:
git clone https://github.com/guimatheus92/node-red-homeassistant-three-way.git
cd node-red-homeassistant-three-way
Build the Docker Image:
Build the Docker image using the following command:
docker-compose up --build
Access the Flask Application:
Open your web browser and navigate to http://localhost:5000
to access the application.
http://127.0.0.1:5000
for local development).In this case, this code is retrieving all devices from Tuya and MQTT sources and ignoring some entities. So, this code works on my end because I have renamed my devices and entity in a certain way.
Then first, go to your Home Assistant -> Developer Tools -> Template: Copy and paste the code and do the changes on your end, before running in the application:
devices.csv
file.mappings.csv
file.Generate NodeRED JSON
button to generate a Node-RED Flow JSON. The file will be generated and downloaded automatically.Execute auto-layout
buttonYou will see the magic happening and will look something like this:
Contributions are welcome! Please fork the repository and submit a pull request.