Gree, Home Connect and Tuya in Home Assistant. Sensor and automation. #FromZeroToAutomatedHome #5
Welcome to the From Zero to Automatic Home series. I will take you with me on the adventure of creating an automatic home from scratch based on Home Assistant. I will try to include in this series all the things I do with my new equipment. I’m doing everything again! There will be a lot of it…
In this episode we add Gree Climate integrations for air conditioning, Home Connect for the Bosch dishwasher and two Tuya integrations. Between the lines there are a lot of my comments and practical advice.
Gree:
https://www.home-assistant.io/integrations/gree/
Home Connect:
https://www.home-assistant.io/integrations/home_connect/
template:
- sensor:
- name: kitchen_dishwasher_timeleft
unit_of_measurement: "min"
state: (greater sign here!!!!!!!!)
{% if is_state('sensor.kitchen_dishwasher_remaining_program_time', 'unknown') or
is_state('sensor.kitchen_dishwasher_remaining_program_time', 'unavailable') or
is_state('sensor.kitchen_dishwasher_operation_state', 'Ready') %}
0
{% else %}
{{ ((states('sensor.kitchen_dishwasher_remaining_program_time')|as_datetime|as_local - now()).seconds / 60) |int }}
{% endif %}
Tuya:
https://www.home-assistant.io/integrations/tuya/
Material in text form:
Welcome back to another episode of the SmarTube series, where we take your smart home setup from the ground up. We’re tracing back to where we left off in our last video, and while everything may not happen at once, we’ve made significant progress. The entire system migration from the old Home Assistant running on Raspberry Pi 3B+ to a Lenovo f Center has almost been completed. Let’s break it down step by step.
Quick Changes & Progress
Instead of following the usual tutorials and lengthy online guides, I’ve decided to show you what I’ve learned through my setup and share quick tips. I’ll link relevant materials and articles so you can explore everything in detail on your own.
Integrations Added to My Home Assistant
1. Gree Climate Integration
I’ve added the integration for G Climate, which controls my air conditioning. Here’s a quick guide:
- Install G Climate Integration:
- Go to Settings > Integrations in Home Assistant.
- Search for “G Climate” and click Add Integration.
- Follow the instructions to link your G Climate system through the official G+ app on your Android device.
- Pair your air conditioning remote, connect it to your Wi-Fi network, and sync it with the integration.
- Advanced Controls:
With G Climate, you can:- Control the temperature
- Set different modes (cool, heat, etc.)
- Adjust blade orientation (up/down, left/right)
This integration offers robust control, even allowing for advanced adjustments that are missing in the official app.
2. Home Connect Integration (Bosch Dishwasher)
Next up, we integrated Home Connect, which is perfect for Bosch devices.
How to Add Your Dishwasher:
- Install Home Connect App
- Download the Home Connect app on your phone.
- Connect your dishwasher to Wi-Fi through the app.
- Integrate in Home Assistant
- In Home Assistant, go to Integrations and search for Home Connect.
- Follow the step-by-step instructions provided in the Home Assistant documentation (I’ll link this in the video description).
- Custom Sensor for Time Remaining
I created a custom sensor to show the remaining cycle time for the dishwasher. Here’s a quick breakdown of the code:
yamlCopy codesensor:
- platform: template
sensors:
kitchen_disw_time_left:
friendly_name: "Dishwasher Time Remaining"
unit_of_measurement: "minutes"
value_template: >
{% if states('sensor.dishwasher_status') in ['unknown', 'unavailable'] %}
0
{% else %}
{{ (state_attr('sensor.dishwasher', 'remaining_time') / 60) | int }}
{% endif %}
This template calculates the remaining time in minutes until the dishwasher cycle ends.
3. Local Thuja Integration
I encountered some challenges with the Thuja integration, initially using the official integration. Instead, I opted for the Local Thuja integration:
- Install the Local Integration
- Search Local Thuja in Home Assistant Add-ons.
- Enter your Client ID, Customer Number, and API Key.
- Benefits of Local Communication
This integration ensures that:
- Your bulbs work locally without cloud delays.
- All statuses and controls are accurately reflected in Home Assistant.
With Local Thuja, everything works seamlessly and faster.
Automation Notifications
I also set up automations to notify me when specific tasks, like dishwasher cleaning, are completed.
- I created a helper in Home Assistant that acts as a switch, turning ON when a dishwasher starts and turning OFF once it completes its task.
- Integrated push notifications on my phone to alert me through the Home Assistant mobile app.
Future Integration Goals
There’s still a lot to do! I’ll be adding:
- Integration for more sensors throughout the house
- Views for different rooms and smart devices
- Comprehensive dashboards for tablet control and centralized monitoring.
Wrapping Up
We’ve made substantial progress in migrating to a more integrated and automated system. By breaking down everything into parts, following tutorials, and experimenting with custom code, I’ve managed to set up robust controls across different devices.
If you’re facing any challenges with your smart home integrations, drop your questions in the comments! Subscribe to SmarTube to follow the journey as we continue to improve and expand our home automation setup.
Thank you for watching, and see you in the next video.
Stay smart! 🚀
Post Comment