Fix recurrence rule generation for UNTIL rules (#14541)

This commit is contained in:
Allen Porter 2022-12-04 05:38:43 -08:00 committed by GitHub
parent 71a5d8c6f9
commit 1aa6bd5577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -189,6 +189,7 @@ class DialogCalendarEventEditor extends LitElement {
</div>
<ha-recurrence-rule-editor
.locale=${this.hass.locale}
.timezone=${this.hass.config.time_zone}
.value=${this._rrule || ""}
@value-changed=${this._handleRRuleChanged}
>

View File

@ -34,6 +34,8 @@ export class RecurrenceRuleEditor extends LitElement {
@property({ attribute: false }) public locale!: HomeAssistant["locale"];
@property() public timezone?: string;
@state() private _computedRRule = "";
@state() private _freq?: RepeatFrequency = "none";
@ -292,6 +294,7 @@ export class RecurrenceRuleEditor extends LitElement {
byweekday: ruleByWeekDay(this._weekday),
count: this._count,
until: this._until,
tzid: this.timezone,
};
const contentline = RRule.optionsToString(options);
return contentline.slice(6); // Strip "RRULE:" prefix