Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DateTimeTrigger in rules configuration #1357

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Apr 21, 2022

Depends on openhab/openhab-core#2923

Signed-off-by: Jan N. Klug github@klug.nrw

@J-N-K J-N-K requested a review from a team as a code owner April 21, 2022 18:01
@relativeci
Copy link

relativeci bot commented Apr 21, 2022

Job #384: Bundle Size — 10.7MB (~-0.01%).

1685b59 vs 0303fce

Changed metrics (1/10)
Metric Current Baseline
Cache Invalidation 1.24% 29.99%
Changed assets by type (1/7)
            Current     Baseline
JS 8.64MB (~-0.01%) 8.64MB

View Job #384 report on app.relative-ci.com

@@ -153,6 +153,7 @@
<f7-list>
<f7-list-item radio :checked="timeEventType === 'cron'" name="timeEventType" title="on a schedule (cron)" @click="updateTimeEventType('cron')" />
<f7-list-item radio :checked="timeEventType === 'timeOfDay'" name="timeEventType" title="at a fixed time of the day" @click="updateTimeEventType('timeOfDay')" />
<f7-list-item radio :checked="thingEventType === 'dateTime'" name="timeEventType" title="at the time specified in an item's state" @click="updateTimeEventType('dateTime')" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<f7-list-item radio :checked="thingEventType === 'dateTime'" name="timeEventType" title="at the time specified in an item's state" @click="updateTimeEventType('dateTime')" />
<f7-list-item radio :checked="timeEventType === 'dateTime'" name="timeEventType" title="at the time specified in an item's state" @click="updateTimeEventType('dateTime')" />

@@ -282,6 +283,10 @@ export default {
case 'timeOfDay':
this.$emit('typeSelect', 'timer.TimeOfDayTrigger', true)
break
case 'dateTime':
this.$emit('typeSelect', 'timer.DateTimeTrigger', true)
if (this.currentItem) this.$set(this.currentModule, 'configuration', Object.assign({}, { itemName: this.currentItem.name }))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.currentItem isn't relevant when you choose a "Time event" trigger, only when you choose "Item event" (then the UI lets you pick an item (put into this.currentItem and only then you may choose the trigger type and configuration).

Since the generic config sheet is already displayed for these "Time event" triggers (so you'll be able to choose the item) I suppose there's nothing more to do than remove this line.

J-N-K added 2 commits April 22, 2022 18:22
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K force-pushed the feature-datettimetrigger branch from 63cdbaa to 794938b Compare April 22, 2022 16:23
@J-N-K
Copy link
Member Author

J-N-K commented Apr 24, 2022

The core PR has been merged.

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, good to have the UI catching up swiftly to core changes!

@ghys ghys merged commit b7500b5 into openhab:main Apr 25, 2022
@ghys ghys added this to the 3.3 milestone May 1, 2022
@ghys ghys added main ui Main UI enhancement New feature or request labels May 1, 2022
@J-N-K J-N-K deleted the feature-datettimetrigger branch May 10, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants