Yet another dimmer/scene switch blueprint

About

This is another blueprint inspired by @troy on their Inovelli LZW31-SN Dimmer blueprint. I started with a port last week inside my Generic MQTT scene state switch but I wanted compatibility with the native Z-WaveJS rather than MQTT.

Additions in this implementation

  • Device selection works
  • Does not require the use of the logbook package
  • Hold down loop event offers dimmer actions (thanks @jerelabs for the inspiration ZWave-JS - Homeseer HS-WD100+ Dimmer)
  • Label keys as up/down rather than A/B
  • Configure up/down button orientation
  • Bring back the config scene event for Inovelli devices
  • Updated w/ master link (again) to capture the mid-April updates for 2021.04 breaking changes for ZwaveJS central scene

How to use

  1. Select your Z-WaveJS device
  2. Configure actions for each scene available from your device
    • Your device may not support each of the scene levels. You should review your device profile in Z-WaveJS or developer tools for clues
3 Likes

Hi,
Thanks a lot for this improved Blueprint.
I have several Inovelli LW31 dimmers, some of the ā€œRed Seriesā€ (LZW31-SN) and some of the ā€œBlack Seriesā€ (LZW31).
The Red Series dimmers all work nice with your Blueprint. Unfortunately my ā€œBlack Seriesā€ dimmers donā€™t show up in the drop-down list as valid devices (they donā€™t show up in the version from @troy either).
Is it possible that you modify the Blueprint so that Black Series devices can be selected? I know they donā€™t support multi-clicks, but it would be nice to configure the ā€œConfigā€ button at least.
I also noticed that my Nortek Thermostats show up as selectable devices, which I donā€™t think they should?
The screenshot below shows some of my devices. The blue circled ones show up in your drop-down as possible devices.

Hi @HermannVI, I would like to explain my design philosophy here which causes the extra devices (ex. GoControl) to show up. The blueprint can be linked to any sensor devices from ZwaveJS because thatā€™s where HA/ZwaveJS accept central scene notification events. For the sake of simplicity Iā€™m showing all sensors because I wanted this to be very flexible and not critical to have a ā€œguest listā€ of accepted devices. Looking for any guidance from the community if thereā€™s a better way to filter a blueprint based on the presence of Zwave central scene notification. Otherwise, Iā€™m leaning on end users to know which device they should be using.

Regarding the config button on your black switch, weā€™ll need to configure a separate blueprint because the device type and signal likely differ from the template Iā€™ve defined here. I can assist with a separate blueprint if you can paste back some output generated from the developer tools.

How to capture events from developer tools

  1. Enable the developer tools for your login
  2. Navigate to the developer tools
  3. Click on the Events tab
  4. Enter the asterisk character inside the Event to subscribe to input box
  5. Click on the Start listening link
  6. Use the config button on the switch
  7. Copy/paste whatever shows up from there
Example of what a captured events might appear as:

Event 1 fired 7:34 PM:

{
    "event_type": "state_changed",
    "data": {
        "entity_id": "switch.adaptive_lighting_living_room",
        "old_state": {
            "entity_id": "switch.adaptive_lighting_living_room",
            "state": "on",
            "attributes": {
                "brightness_pct": 10,
                "color_temp_kelvin": 1000,
                "color_temp_mired": 1000,
                "rgb_color": [
                    255,
                    67.92041905680745,
                    0
                ],
                "xy_color": [
                    0.673,
                    0.322
                ],
                "hs_color": [
                    16.016,
                    98.431
                ],
                "sun_position": 0.08193712311882095,
                "manual_control": [],
                "friendly_name": "Adaptive Lighting: Living room",
                "icon": "mdi:theme-light-dark"
            },
            "last_changed": "2021-03-27T19:26:51.030187+00:00",
            "last_updated": "2021-03-31T23:32:56.527220+00:00",
            "context": {
                "id": "49987078f4af147df54d1fe195b6d461",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "switch.adaptive_lighting_living_room",
            "state": "on",
            "attributes": {
                "brightness_pct": 10,
                "color_temp_kelvin": 1000,
                "color_temp_mired": 1000,
                "rgb_color": [
                    255,
                    67.92041905680745,
                    0
                ],
                "xy_color": [
                    0.673,
                    0.322
                ],
                "hs_color": [
                    16.016,
                    98.431
                ],
                "sun_position": 0.07422283057998613,
                "manual_control": [],
                "friendly_name": "Adaptive Lighting: Living room",
                "icon": "mdi:theme-light-dark"
            },
            "last_changed": "2021-03-27T19:26:51.030187+00:00",
            "last_updated": "2021-03-31T23:34:26.527901+00:00",
            "context": {
                "id": "39c5cdb93f7d893c0d24f235f45cb275",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-31T23:34:26.527901+00:00",
    "context": {
        "id": "39c5cdb93f7d893c0d24f235f45cb275",
        "parent_id": null,
        "user_id": null
    }
}

Hello @moshess,

Thanks for your clarification, and for your suggestion on how to add the Inovelli Black series dimmers.

I followed your instructions and tried to capture events in the developer tool.

Itā€™s very strange, I can capture any event for the Inovelli Red series dimmers, but whenever I press any button (even the standard up/down or the config switch) on a Black series dimmer, nothing shows up at all.

I set the listening event to
zwave_js_event
and when I press a button of a red series dimmer, I get something like this:

Event 2 fired 6:10 PM:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 15,
        "home_id": 3921003827,
        "endpoint": 0,
        "device_id": "9ddeebdb40317902b25f6f4309f116b0",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-01T01:10:45.099661+00:00",
    "context": {
        "id": "30ce08af888084e416bbed216f5e4ce2",
        "parent_id": null,
        "user_id": null
    }
}

I was wondering if you can help. Iā€™m trying to use this blueprint, however, It isnā€™t finding any of my dimmers or scene capable switches. Is there a way to mark them as scene capable or dimmer? I have a mixture of WS and WD 100/200ā€™s switches.

@NJJay How are your Zwave devices communicating w/ HA? This profile intends to work with the native zwave_js support and is filtered on sensor devices. I wonder if your device is not exposed as a sensor like most of the switches are on my network.

For curiosity sake I see that your switches support central scene notification, so maybe we just need to adjust the filter for the device selection.

@HermannVI sorry for the late response here but I think I know whatā€™s going on after reading this discussion on Inovelliā€™s forum: Black Series Discontinuation Announcement (and Sale!) - News - Inovelli Community.

It basically admits that the key difference between black and red is the lack of scene notification, so I donā€™t think thereā€™s too much we can do here without changing the hardware.

Thanks for following up on this. This is good to know for new switches Iā€™ll install in the future.

@moshess - Good to see you back on here! I was hoping you would might want to update in your original post the link you have to your yaml. It links back to the February version and not your current and far more usable April 18th version ( homeassistant-blueprints/zwavejs-dimmer-switch.yaml at 99842796599ffe65d3fe20172d2b21ec1bbd9d20 Ā· moshess/homeassistant-blueprints Ā· GitHub ).

This has been wonderful work. Only really think I could hope for more is it going back to a dimmed value after itā€™s been shut off (and turned back on again). (EDIT: lol, figured that out!)

@jonathanweinberg Glad to be back! I just updated the link and suspect the system user may update it once more with the actual commit-sha, but this time it will include all of the updates.

1 Like

@moshess I take back all those nice things I said and replace them with even nicer ones! You rock.

1 Like

Logger: homeassistant.components.automation.new_automation
Source: components/automation/init.py:517
Integration: Automation (documentation, issues)
First occurred: 5:26:15 PM (2 occurrences)
Last logged: 5:29:44 PM

Error while executing automation automation.new_automation: UndefinedError: ā€˜dict objectā€™ has no attribute ā€˜eventā€™

Is the error im getting trying to run this automation.

Logger: homeassistant.components.automation.new_automation
Source: helpers/script.py:1341
Integration: Automation (documentation, issues)
First occurred: 5:26:15 PM (2 occurrences)
Last logged: 5:29:44 PM

Roof Deck: Error executing script. Error rendering template for variables at pos 1: UndefinedError: ā€˜dict objectā€™ has no attribute ā€˜eventā€™

@NJJay would you confirm that your target sensor device is Zwave and uses the built-in HA ZwaveJs plug-in? I recall that earlier you had trouble finding your devices, so Iā€™m curious if you had modified the device selector in any way. Doing so would impact what attributes can be observed and used in automations similar to what youā€™ve shown here.

If you are not using zwave_js (HA plugin since earlier this year), then I would suggest we fork off this thread into a separate discussion on how to find or define support suitable for your devices.

Just found this and it saved me a TON of time. My only question is, is there a way to speed up the sun up/down speed? I have to hold the dimmer forever to get it to actually dim from 10% to 100%. Iā€™m using a ZEN77 from Zooz for this test.

1 Like

Hi @broyuken1, unless youā€™re referring to the ā€œLoopā€ control in the blueprint I think the configuration youā€™re looking for is actually managed on the ZEN77 device itself. Itā€™s referred to as the Physical Dimming Speed and here is a page that I found from the manufacturer explaining the advanced parameters that control that behavior (check out parameter 16): https://www.support.getzooz.com/kb/article/550-zen77-s2-dimmer-700-advanced-settings/.

Assuming youā€™re operating from ZwaveJs with a semi-recent install for HA, then you can manage it from the Configuration page, navigate to devices, locate the link for your target device and finally click on the Configure device screen to update the advanced parameters outlined in that document.

I believe the issue is with the loop because my setting is 5 seconds from 0-100%, but it takes probably 30 seconds or longer to dim the switch via this blueprint

Can you share what you have configured beneath the Key Up/On held? I observed that my network will generate a large number of recurring events when I hold the up/button, so we need to consider an adjustment to the technique used to dim the lights.

So I ran it again and it worked fine. However could you please share the logic you used for the repeat? I cant decipher it and I want to modify the automation to turn on the little led on my switch when the bulbs are off.

{{ not is_loop_for_key_held }}

Ping @moshess