Help Creating a rule in rule machine

Hi, i'm trying to create a rule to control my fan from a novelli blue switch, but not sure how to go about it in rule machine. Any help or input would be appreciated. This is a copy from invelli below.

Create a Rule in Rule Machine
Trigger:
• Button 7 pushed on your VZM31‑SN
Actions (in order):
IF (FanCycleState = "off") THEN
Set FanCycleState to "on"
Set VZM36 Fan to On
ELSE-IF (FanCycleState = "on") THEN
Set FanCycleState to "low"
Set VZM36 Fan Speed to Low
ELSE-IF (FanCycleState = "low") THEN
Set FanCycleState to "medium"
Set VZM36 Fan Speed to Medium
ELSE-IF (FanCycleState = "medium") THEN
Set FanCycleState to "high"
Set VZM36 Fan Speed to High
ELSE-IF (FanCycleState = "high") THEN
Set FanCycleState to "off"
Turn Off VZM36 Fan
END-IF

Looks like you have logic, these should get you over the hump.

How to Use Rule Machine Part 1: The Basics
How to Use Rule Machine 2: Simple Conditional Rules
How to Use Rule Machine Part 3: Advanced Conditional Rules

1 Like

Thank you I'll check it out.

Does the "Cycle Speed" command not do what you want? From the rule it looks like you're trying to write, that's what this command alone is supposed to do (if you're using their driver, I can't speak to how it was implemented, but this is typical behavior).

I would use a state variable incremented to a max each time you press the button. Using that variable after incrementing or resetting, set the fan speed based on the current value. Much cleaner code imho.

Hi So I did have this set up a year ago where the switch paddle would control the light as a dimmer and the favorite/config controlled the fan for different speeds then I ran into this warning in the log file John's Fan Switch BASIC_CLUSTER Unknown Attribute:null so I repaired the switch ran into issues long story short ended up removing the fan and starting from scratch after repairing everything and binding I can not figure out how to get those functions back. now today after all the re configuring the warning is back in the log John's Fan Switch BASIC_CLUSTER Unknown Attribute:null. The rule machine trigger above was sent to me from Inovelli tech but this is getting a little over my head and i know I didn't have to do this before. Any help would be greatly appreciated I perhapes should have this post in your thread. I should mention I have c8 with a VZM36 canopy module blue and a VZM31-SN blue switch.