# Multisegment for Home Automation Systems - Fades and Brightness

**URL:** <https://forum.electromage.com/t/multisegment-for-home-automation-systems-fades-and-brightness/2011>\
**Category:** Patterns and Code\
**Created:** [February 8, 2022, 6:29am UTC](https://forum.electromage.com/t/multisegment-for-home-automation-systems-fades-and-brightness/2011 "2022-02-08T06:29:55Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![zranger1](https://forum.electromage.com/user_avatar/forum.electromage.com/zranger1/32/301_2.png) [@zranger1](https://forum.electromage.com/u/zranger1)\
**Post date:** [February 11, 2022, 9:57pm UTC](https://forum.electromage.com/t/multisegment-for-home-automation-systems-fades-and-brightness/2011/15 "2022-02-11T21:57:32Z")

</div>

@dan-tron, you can get the Python pixelblaze library by typing

`pip install pixelblaze-client`

on a command line from which you can use Python. It’s really handy for testing and debugging. More information in [this thread](https://forum.electromage.com/t/pixelblaze-client-python-3-library-for-pixelblaze/756).

One thing to be aware of while automating: right now changing the segment state doesn’t trigger a fade. Only level changes do.

So if you want smooth on/off switching, the best way to implement that is to have the controller store the current level and fade to 0 for off, and fade back up to the stored level for on. The controller is generally an easier place to store persistent information anyway.

I’ll change this in a future version. It’s a consequence of architecture - the array you send via websockets is not commands, it’s actually the internal state of the pattern, which gets applied pretty much instantly. The state/switch element is right now, an absolute render/don’t render switch.

---

_[View the full topic](https://forum.electromage.com/t/multisegment-for-home-automation-systems-fades-and-brightness/2011)._
