Saving Zwave params in a scene

Running the 2021.9.6 with ZwaveJS2MQTT and the ZwaveJS integration.

I have some devices which are controllable by setting zwave params which are not exposed to HA. What’s the best way to save them into a scene, so that they could be reapplied when the scene is called with the scene on service?

Thanks!

You cannot set unknown config parameters from HA. You could do it using MQTT commands.

The best solution would be to either update the device config file yourself and submit a PR, or submit a Bug Report to ask that the file gets updated. Once updated, the parameters will be available to HA, and this benefits the entire community.

Thanks, but I meant that these are parameters which are addressable in HA using the zwave_js_set_config_parameter service (so are already in the config file) – in my case it is a tilt position of some blinds. However, this parameter is not mapped to any HA entity, e.g. the cover entity in this case.

So I can write a script which can get/set these parameters, but I would like to save myself the scripting and I am wondering if it is possible to somehow include such parameter values in a scene, especially an ad-hoc one.

I see, I misunderstood what you meant by “exposed to HA”.

You could try creating template entities. There isn’t another way to access the values with the zwave_js integration. number or select entities could work (depending on the parameter type), although I admit I’m not familiar with scenes and if they are compatible. The state of the entity would have to be a trigger-based template, and the set_value action would be the service call.

MQTT is still another option. I believe (assume) zwavejs2mqtt would expose all the configuration parameters as MQTT topics, and you could manually include those as an MQTT number or select entities in HA, similar to the template sensors described above.

In either case, you are still responsible for creating an action to use a service call for setting the value.

A modification to the integration is another option to create entities for you. There is already a precedence to create entities for specific configuration parameters (sensor only so far). You would need to convince a dev that this is the right approach for your use case, and/or submit a PR with justification. It’s not obvious what the criteria is for acceptance, so this might be a long shot.

OK, this gives me an idea:

I could create an automation which would update an input_number every time that the value of the tilt zwave parameter is updated. Then I could have a ghost input_number helper which would a “desired tilt” and every time before I save a scene, I could copy the tilt param into the desired tilt param and include that in the scene, at least if HA lets me include helpers in scenes. I would then need to have another automation to copy the desired tilt helper to the ZWave value so that the tilt is restored.

Making a patched config file to expose the tilt as an entity was unfortunately rejected by the ZWaveJS devs, so I am trying to be more creative.