Wild-cards on automation rules

Have a great idea about how to expand ML - post it here
RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Wild-cards on automation rules

Postby RZajcew » Sat Jan 09, 2016 1:12 pm

One thing that would make automation rules less cumbersome and less error-prone would be to allow wild-carding in the rule conditions, with subsequent use of the value in the rule action. I think that even allowing a single wild-card would make life far better. At least for me.

My automation rules are filled with sequences such as:

Whenever security_1_status changes value
Macro|Some commands using security_1_status
Whenever security_2_status changes value
Macro|Some commands using security_1_status
Whenever security_3_status changes value
Macro|Some commands using security_1_status

and there are a lot of zones. It's difficult to catch all the possible values, and if you only try to catch "used" values it doesn't lend itself to expandability. If I could write:

Whenever security_<P1>_status changes value
Macro|Some commands using <P1>

I also have (as an example) several Tivos and Tivo minis. And I have rules such as:

Whenever TiVoname1_channel changes value
Macro|Some commands using TiVoname1_channel
Whenever TiVoname2_channel changes value
Macro|Some commands using TiVoname1_channel

and so on. And I recently added a new Tivo mini. And I had to find all my Tivo-related rules and make sure I added a new version for the new mini. This was tedious to get right.

Being able to use Whenever TiVo<P1>_channel changes value
Macro|Some commands using TiVo*_channel
Whenever TiVoname2_channel changes value
Macro|Some commands using <P1>

Looking at my automation rules, this could decrease the number of automation rules I have by at least a factor of 5, and possibly by a factor of 10. And it would make my rules file far more flexible.

Thanks,
Roman

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Wild-cards on automation rules

Postby CinemarDave » Sat Jan 09, 2016 3:02 pm

You can pass parameters to macros today. Would that help?

Whenever TiVoName1_channel changes value then
TivoMacro|Name1


TivoMacro is
Macro|Some commands using TiVo<p1>_channel ...

RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Re: Wild-cards on automation rules

Postby RZajcew » Sat Jan 09, 2016 5:43 pm

No. I already use macros within Automation rules all the time. They are all of the form:

Whenever Tivoname1_channel changes value
Tivo.Channelchange|Tivoname1~{{TivoName1_channel}}

So I can definitely limit the number of macros, and simplify rule writing.

What I want to do is avoid massive repetition in the rules themselves (avoid writing a rule per security zone) and to allow better extensibility (being add another device of some type, such as a new Tivo, without having to go back and figure out all the per-Tivo automation rules, of which there are several). Hence the wild-carding.

Thanks,
Roman


Return to “MainLobby Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest