Here is how I have automated my pool light to work with Home Assistant.
I wanted to do this because the cost of the pool light controller was both expensive and still requires one to exit the pool and walk through rocks to reach the switch…Not ideal. The solution was quite simple, actually.
I used a GE Smart Switch (12722 on/off; NO dimmer) and simply replaced the old switch.I tested operation manually, added the switch to Home Assistant via Z-Wave, and tested toggling colors manually through the GUI. “Easy Peasy.!”
Next, I had to dial in the timing of the switch to determine the best delay between selections. I did my testing on a lightbulb that was hooked up to an identical switch, since the cost is considerably less than my new pool light!
Once satisfied, it was time to program and perform a live test on the pool itself. Here is the final config:
I use one input selection for the color and another for setting the scenes, like so:
#####################################################################
### Pool Light Scene
#####################################################################
pool_scene:
name: Pool Scene
initial: "Select an option..."
options:
- "Select an option..."
- "Cycle"
- "Party"
- "Romance"
- "Caribbean"
- "Patriotic"
- "Sunset"
- "Royal"
#####################################################################
### Pool Light Color
#####################################################################
pool_color:
name: Pool Color
initial: "Select an option..."
options:
- "Select an option..."
- "Blue"
- "Green"
- "Red"
- "White"
- "Magenta"
This looks awesome…what z-wave hub are you using? I’m new to this and want to make sure I can pick up something that is configurable like this. Was eyeing the Samsung Smartthings hub but the screenshots look different than the app you’re using.
I don’t use a z-wave hub - just the Aeotec Gen5 USB stick …
FYI - my repo has been updated. Unfortunately, Home Assistant UI forces all my yaml to one big file, so you will have to search a bit but here are the relevant links:
How is the light integrated with HA? I don’t see any official support. Are you just flipping the switch on and off to trigger different lights to come on? I see you have channels listed in the sequence. But not sure what they mean.
Yes. It is an on/off switch that changes color based on the number of on/off toggles that are sent in a short period of time. This is specific to the Pentair 5G light series.
The switch is a “dumb” smart switch (aka an on/off non-dimmer) typical GE variety. It can be flaky at times but beats walking over rocks!
Power cycling a transformer will not cause any sort of wear or damage. It’s just some coils of wire - and wire doesn’t wear out faster if it’s carrying electricity or not.
About the only way to harm a transformer is over-loading it as it will cause high temps and can short the coils due to insulation failure; and anything with the physical environment it’s contained in that could harm it (corrosion, etc).
The pentair light is designed to use a standard on/off switch. I just replaced the standard switch with a GE switch in an outdoor housing … it’s not rated for outdoor but has survived 2 seasons and it is up to 117 F in the hot sun here…
It’s been a long time since I updated this thread and saw some activity so I thought I’d update it.
I started to use this solution but noticed that z-wave on/off was not always reliable for me and the color was not what i selected. So I moved the automation to a local relay using an esp8266 and a relay board. If anyone is interested in the code, it’s here. In node red I link alexa to this entity and I can set the red/blue/green/pink colors via voice. The custom ‘weird’ colors need to be set via hass. and ofcourse i maintain a standard light switch as well. The microcontroller and the relay fit behind the light switch in the outdoor switch box and run off the ac power to the light transformer using an buck converter.
I’ve messed around with this in a variety of different ways using a shelly1 flashed with tasmota and putting it in the junction box between the light switch and the light. I leave the lightswitch in the on position 24/7.
Nothing really worked well. This was partially because the shelly1 is very far away from my router and probably has a lot of interference in the jbox. I found using home assistant to toggle the entity state using automations was never very reliable. I also fried a shelly1 doing it this way and had to replace it.
Then I discovered the magic of Tasmota backlog commands! This was a game changer for me.
I have one HA script that will just shut the pool light off and wait a few seconds if it meets the condition that the light is already turned on. This gets called first by all my color setting scripts.
pool_prepare_color:
alias: Pool Prepare Color Mode
description: Puts the pool light in a condition where it can begin setting a color
mode.
mode: single
icon: mdi:cog
sequence:
- condition: state
entity_id: switch.tasmota_shelly1_pool_light
state: "on"
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: Power 0; Delay 60
pool_mode_01_sam:
alias: Pool Demo
description: Cycles through white, magenta, blue and green colors. Demo program
from manufacturer
icon: mdi:looks
mode: single
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 1; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_02_party:
alias: Pool Party
description: Rapid color changing building energy and excitement.
icon: mdi:balloon
mode: single
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 2; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_03_romance:
alias: Pool Romance
description: Slow color transitions creating a mesmerizing and calming effect.
icon: mdi:heart-box-outline
mode: single
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 3; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_04_caribbean:
alias: Pool Caribbean
description: Transitions between a variety of blues and greens.
mode: restart
icon: mdi:beer
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 4; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_05_america:
alias: Pool America
description: Patriotic red, white and blue transition.
mode: restart
icon: mdi:flag
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 5; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_06_california_sunset:
alias: Pool California Sunset
description: Dramatic transitions of orange, red and magenta tones.
mode: single
icon: mdi:sunglasses
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 6; BlinkTime 5; Power 1; Delay 20; Power 3
pool_mode_07_royal:
alias: Pool Royal
description: Richer, deeper color tones.
mode: single
icon: mdi:crown
sequence:
- service: script.pool_prepare_color
- service: mqtt.publish
data:
topic: cmnd/tasmota_2DD0BF/backlog
payload: BlinkCount 7; BlinkTime 5; Power 1; Delay 20; Power 3
Has anyone tried automation while still maintaining the Pentair color controller? I like having the color selector by the pool in case that is what I want to use but it’s also like to be able to turn on and off the light with ha. I know I could remove the controller and put in a scene controller but I like to keep things idiot proof too.