### card-mod Styling for Irrigation Unlimited Card Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Example of using card-mod to apply custom CSS styles to the Irrigation Unlimited Card. This includes targeting specific elements by class and attribute for visual customization. ```yaml # card_mod example: colour zones and hide controller menu type: custom:irrigation-unlimited-card always_show_zones: true card_mod: style: | /* Colour the clock/schedule column header */ div.iu-header-row .iu-td4 ha-icon { color: steelblue } /* Bold zone names when running */ div.iu-zone.iu-on .iu-name { font-weight: bold; color: limegreen } /* Hide the controller-level hamburger menu */ div.iu-controller-row .iu-td7 { visibility: hidden } /* Hide a specific zone by its iu-key (controller 1, zone 2) */ div.iu-zone[iu-key="1.2.0.0"] { display: none } /* Target the 3rd sequence of controller 1 */ div.iu-sequence[iu-key="1.0.3.0"] .iu-name { color: orange } ``` -------------------------------- ### Update Timed Stats in IUBase Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Updates remaining time and percentage completed for timed objects based on current status, start time, and duration. This is called periodically by a timer. ```typescript class IUBase { public update_stats(now: Date): void { if (this.start && this._duration) { if (this.status === "on" || this.status === "delay") { const elapsed = elapsed_secs(now, this.start); // (now - start) in seconds this._remaining = this._duration - elapsed; this._percent_completed = percent_completed(elapsed, this._duration); } } } public get remaining(): string | undefined { return secs_to_hms(this._remaining); // → "0:04:32" } public get duration(): string | undefined { return secs_to_hms(this._duration); // → "0:30:00" } } // Example: zone entity attributes from hass.states // { // status: "on", // current_start: "2024-06-01T06:00:00+00:00", // current_duration: "0:30:00", // time_remaining: "0:22:14", // current_schedule: 1, // current_name: "Morning", // current_adjustment: "%80" // } ``` -------------------------------- ### Update IUCoordinator State and Timer Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Updates the IUCoordinator's state by polling entities and managing a 1-second countdown timer. The timer is started when any entity is active and stopped when all are idle. This method is called from the `shouldUpdate` hook. ```typescript public update(hass: HomeAssistant): boolean { if (!this.initialised) return false; let result = IUUpdateStatus.None; // 0 for (const c of this.controllers) result |= c.update(hass); // IUUpdateStatus.TimerRequired (bit 1) is set when any entity is "on" or "delay" if (this.timer_id === undefined && (result & IUUpdateStatus.TimerRequired) !== 0) { this.start_timer(hass); // starts setInterval(1000) for live countdown } else if (this.timer_id !== undefined && (result & IUUpdateStatus.TimerRequired) === 0) { this.stop_timer(); // clears interval when nothing is running } return result !== 0; // true → Lovelace re-renders the card } // shouldUpdate hook in the card element protected shouldUpdate(changedProps: PropertyValues): boolean { if (!this.hass) return false; if (changedProps.has("config")) return true; return this.iu_coordinator.update(this.hass); } ``` -------------------------------- ### Initialize IUCoordinator with Home Assistant Data Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Initializes the IUCoordinator by fetching controller and zone information from the Home Assistant `irrigation_unlimited.get_info` service. This method is idempotent and should be called on first update. ```typescript export class IUCoordinator { public readonly controllers: IUController[]; private initialised: boolean = false; public init(hass: HomeAssistant): void { if (!hass || this.initialised) return; this._getInfo(hass).then((response) => { this.version = response.version; for (const c of response.controllers) this.controllers.push(new IUController(c)); this.validateEntities(hass); // removes entities that no longer exist in hass.states this.initialised = true; this.parent.requestUpdate(); // triggers first render }); } private async _getInfo(hass: HomeAssistant): Promise { const response: GetInfo = ( await hass.callService( "irrigation_unlimited", "get_info", {}, { entity_id: "irrigation_unlimited.coordinator" }, true, // return_response true, // require_success ) ).response; return response; // Returns: { version: "2026.1.0", controllers: [{ index, name, controller_id, entity_id, zones, sequences }] } } } ``` -------------------------------- ### Minimalist Configuration Source: https://github.com/rgc99/irrigation-unlimited-card/blob/master/README.md Removes the controller menu, zone, and sequence controls, displaying only sequences. Useful for a streamlined interface. ```yaml type: custom:irrigation-unlimited-card always_show_sequences: true always_show_zones: false card_mod: style: | /* Remove controller menu */ div.iu-controller-row .iu-td7 { visibility: hidden } /* Remove zone and sequence buttons */ div.iu-control-panel { display: none } ``` -------------------------------- ### Full Lovelace YAML Configuration Options Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Demonstrates a comprehensive YAML configuration for the Irrigation Unlimited Card, showcasing all available options for customization. ```yaml # Full configuration with all options type: custom:irrigation-unlimited-card name: "Garden Irrigation" # Card header title (default: none) show_controllers: "1,3" # CSV list of controller IDs to display (default: all) always_show_zones: true # Expand zones on load (default: false) always_show_sequences: true # Expand sequences on load (default: false) show_timeline_scheduled: true # Show upcoming scheduled runs in timeline (default: true) show_timeline_history: true # Show past runs in timeline (default: true) ``` -------------------------------- ### Minimal Lovelace YAML Configuration Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Provides the most basic YAML configuration required to add the Irrigation Unlimited Card to a Home Assistant dashboard. ```yaml # Minimal Lovelace YAML configuration type: custom:irrigation-unlimited-card ``` -------------------------------- ### Resume Service (`_serviceResume`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Resumes all sequences of a controller using the `irrigation_unlimited.resume` service. ```APIDOC ## Service Calls — Resume (`_serviceResume`) Resume operate on all sequences of a controller (`sequence_id: "0"` means all). ### Method POST ### Endpoint /api/services/irrigation_unlimited/resume ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the controller. - **sequence_id** (string) - Required - Set to "0" to resume all sequences. ### Request Example ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_m", "sequence_id": "0" } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Manual Run Service (`_serviceManualRun`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Manually runs a zone or sequence for a specified duration using the `irrigation_unlimited.manual_run` service. ```APIDOC ## Service Calls — Manual Run (`_serviceManualRun`) Calls `irrigation_unlimited.manual_run` with a user-supplied duration (`h:mm:ss` format). Triggered by Enter key or clicking the play button. ### Method POST ### Endpoint /api/services/irrigation_unlimited/manual_run ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the zone or sequence to run. - **time** (string) - Optional - The duration to run in `h:mm:ss` format (e.g., "0:15:00" for 15 minutes). ### Request Example ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z2", "time": "0:15:00" } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Enable/Toggle Service (`_serviceEnable`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Toggles the enabled state of a controller, zone, or sequence by calling the `irrigation_unlimited.toggle` service. ```APIDOC ## Service Calls — Enable/Toggle (`_serviceEnable`) Calls `irrigation_unlimited.toggle` to flip the enabled state of a controller, zone, or sequence. ### Method POST ### Endpoint /api/services/irrigation_unlimited/toggle ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the controller, zone, or sequence to toggle. ### Request Example ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1" } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Time and Date Utility Functions Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Helper functions for converting time formats, formatting dates for display, calculating elapsed time, and determining completion percentages. ```typescript // src/util.ts // Convert "h:mm:ss" string to total seconds hms_to_secs("0:30:00") // → 1800 hms_to_secs("1:05:30") // → 3930 hms_to_secs(undefined) // → undefined // Convert total seconds back to "h:mm:ss" string secs_to_hms(1800) // → "0:30:00" secs_to_hms(3930) // → "1:05:30" secs_to_hms(undefined) // → undefined // Format a Date for display (uses browser locale, 24-hour clock) date_to_str(new Date("2024-06-01T06:00:00")) // → "Sat, 6/1, 06:00" (locale-dependent) // Elapsed seconds between two dates elapsed_secs(new Date("2024-06-01T06:10:00"), new Date("2024-06-01T06:00:00")) // → 600 // Percentage of elapsed vs total percent_completed(600, 1800) // → 33 (33% through a 30-minute run) // Convert internal adjustment string to display format humanise_adjustment("%80") // → "80%" humanise_adjustment("+0:05:00") // → "+0:05:00" humanise_adjustment("") // → "" ``` -------------------------------- ### Manually Run Irrigation Unlimited Zone Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Calls `irrigation_unlimited.manual_run` with a user-supplied duration in `h:mm:ss` format. Triggered by Enter key or clicking the play button. Ensure the `time` data is correctly formatted. ```typescript // src/irrigation-unlimited-card.ts private _serviceManualRun(e: Event): void { if (this._isNotEnterKey(e)) return; const data = this._build_data(e); if (!data) return; const timeElement = (e.target as Element) .closest(".iu-menu-item") ?.querySelector(".iu-time-input") as HTMLInputElement; if (timeElement.value) data["time"] = timeElement.value; // e.g. "0:15:00" this.hass.callService("irrigation_unlimited", "manual_run", data); // Equivalent Home Assistant service call: // service: irrigation_unlimited.manual_run // target: // entity_id: binary_sensor.irrigation_unlimited_c1_z2 // data: // time: "0:15:00" this._toggleMenu(e); } ``` -------------------------------- ### Register Custom Card and Element Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Registers the card with Home Assistant's customCards and declares it as a custom element using @customElement. This allows Lovelace to discover and use the card. ```typescript // src/irrigation-unlimited-card.ts (window as any).customCards = (window as any).customCards || []; (window as any).customCards.push({ type: "irrigation-unlimited-card", name: "Irrigation Unlimited Card", description: "A companion card for the Irrigation Unlimited integration", }); @customElement("irrigation-unlimited-card") export class IrrigationUnlimitedCard extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; @state() private config!: IrrigationUnlimitedCardConfig; private iu_coordinator = new IUCoordinator(this); // Called by Lovelace to open the visual editor public static async getConfigElement(): Promise { return document.createElement("irrigation-unlimited-card-editor"); } // Returns a minimal stub when added from the card picker public static getStubConfig(): Record { return {}; } } ``` -------------------------------- ### Party Mode with Header and Styling Source: https://github.com/rgc99/irrigation-unlimited-card/blob/master/README.md Adds a header image and applies custom styling to the card title, icons, and controls using card-mod. Useful for visually enhancing the card. ```yaml type: entities header: type: picture image: >- https://www.home-assistant.io/images/dashboards/header-footer/balloons-header.png entities: - type: custom:irrigation-unlimited-card name: Let's Irrigate 💦🌱 always_show_sequences: true always_show_zones: false card_mod: style: $: | /* Colour the card title */ h1.card-header { color: magenta } .: | /* Remove border around card */ ha-card { border: none } /* Colour header icons */ div.iu-header-row .iu-td4 ha-icon { color: red } div.iu-header-row .iu-td5 ha-icon { color: green } div.iu-header-row .iu-td6 ha-icon { color: blue } div.iu-header-row .iu-td7 ha-icon { color: khaki } /* Colour the controls */ div.iu-control-panel-item.iu-show-zones {color: crimson } div.iu-control-panel-item.iu-show-sequences {color: indigo } /* Colour the expanders */ div.iu-expander.iu-td1 { color: orange } /* Colour the menu buttons */ div.iu-menu > ha-icon { color: khaki } /* Colour the menu items */ div.iu-menu-item.iu-enable { color: green } div.iu-menu-item.iu-suspend { color: blue } div.iu-menu-item.iu-manual { color: red } div.iu-menu-item.iu-cancel { color: purple } div.iu-menu-item.iu-adjust { color: orange } state_color: false card_mod: style: | div.card-content { padding: 0; } ``` -------------------------------- ### IrrigationUnlimitedCardConfig TypeScript Interface Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Defines the TypeScript interface for the card's configuration, outlining all possible properties and their types. ```typescript // TypeScript interface export interface IrrigationUnlimitedCardConfig extends LovelaceCardConfig { type: string; name?: string; show_controllers?: string; always_show_zones?: boolean; always_show_sequences?: boolean; show_timeline_history?: boolean; show_timeline_scheduled?: boolean; } ``` -------------------------------- ### Pause Service (`_servicePause`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Pauses all sequences of a controller using the `irrigation_unlimited.pause` service. ```APIDOC ## Service Calls — Pause (`_servicePause`) Pause operate on all sequences of a controller (`sequence_id: "0"` means all). ### Method POST ### Endpoint /api/services/irrigation_unlimited/pause ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the controller. - **sequence_id** (string) - Required - Set to "0" to pause all sequences. ### Request Example ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_m", "sequence_id": "0" } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Toggle Irrigation Unlimited Controller/Zone/Sequence Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Calls the `irrigation_unlimited.toggle` service to flip the enabled state of a controller, zone, or sequence. The `iu-key` attribute on the DOM element determines the entity. ```typescript // src/irrigation-unlimited-card.ts private _serviceEnable(e: Event): void { const data = this._build_data(e); // data = { entity_id: "binary_sensor.irrigation_unlimited_c1_z1" } if (!data) return; this.hass.callService("irrigation_unlimited", "toggle", data); } // iu-key attribute on the DOM element drives entity resolution: // "1.1.0.0" → controller 1, zone 1 // "1.0.2.0" → controller 1, sequence 2 // "1.0.1.3" → controller 1, sequence 1, sequence-zone 3 ``` -------------------------------- ### Localisation Class for Translation Bundles Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Initialise with a preferred language code. The `t` method resolves dot-separated keys, falling back to English if a translation is not found. ```typescript // src/localize.ts export class localise { constructor(preferred: string) { // "de-AT" → tries "de-AT", then "de", then "en" if (!(preferred in languages)) { preferred = preferred.substring(0, 2); if (!(preferred in languages)) preferred = "en"; } this.lang = preferred; } public t(key: string): string { // key "menu.adjust.hint" → languages[lang]["menu"]["adjust"]["hint"] const keys = key.split("."); try { return this.find(this.lang, keys); } catch (e) { try { if (this.lang !== "en") return this.find("en", keys); } catch (e) { return ""; } } } } // Usage throughout the card: const loc = new localise(window.navigator.language); loc.t("menu.manual.name") // → "Manual" loc.t("menu.adjust.hint") // → "Adjustment options\n===============\n..." loc.t("editor.alwaysShowZones.name") // → "Always show zones" // Supported language codes: af, de, en, es, hu, it, nb, pl, pt, ro, sk ``` -------------------------------- ### Irrigation Unlimited Card CSS Class and iu-key Structure Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Explanation of the CSS class structure and the `iu-key` attribute format used for targeting elements within the Irrigation Unlimited Card. Includes a list of common state classes. ```text # iu-key format: "controller.zone.sequence.sequence_zone" # "1.0.0.0" → controller 1 # "1.2.0.0" → controller 1, zone 2 # "1.0.3.0" → controller 1, sequence 3 # "1.0.2.4" → controller 1, sequence 2, sequence-zone 4 # State classes applied to .iu-object elements: # iu-on object is currently running # iu-paused sequence is paused # iu-delay object is in inter-zone delay # iu-enabled object is enabled # iu-suspended object is suspended # iu-manual run was triggered manually (not scheduled) # iu-running sequence has remaining time (broadly active) # iu-blocked zone is blocked by another controller ``` -------------------------------- ### setConfig Method for Runtime Validation Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt The setConfig method is called by Lovelace to process the card's configuration. It performs basic validation to ensure the configuration is valid. ```typescript // Runtime validation inside the card public setConfig(config: IrrigationUnlimitedCardConfig): void { if (!config) { throw new Error("Invalid configuration"); } this.config = config; } ``` -------------------------------- ### Suspend Service (`_serviceSuspend`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Suspends scheduled runs for a specified duration or resets an existing suspension using the `irrigation_unlimited.suspend` service. ```APIDOC ## Service Calls — Suspend (`_serviceSuspend`) Calls `irrigation_unlimited.suspend` to pause all scheduled runs for a given duration, or `reset` to lift an existing suspension. ### Method POST ### Endpoint /api/services/irrigation_unlimited/suspend ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the controller. - **for** (string) - Optional - The duration to suspend in `h:mm:ss` format (e.g., "2:00:00" for 2 hours). - **reset** (null) - Optional - If provided and `for` is not, this will lift the existing suspension. Use `null` for the value. ### Request Example Suspend for 2 hours: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_m", "for": "2:00:00" } ``` Reset suspension: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_m", "reset": null } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Advanced Element Hiding Source: https://github.com/rgc99/irrigation-unlimited-card/blob/master/README.md Demonstrates hiding various elements of the card, including header rows, separators, buttons, and specific zones or sequences. Use for fine-grained control over card visibility. ```yaml type: custom:irrigation-unlimited-card always_show_sequences: true always_show_zones: true card_mod: style: | /* Hide the header row */ div.iu-header-row { display: none } /* Hide the line seperating controllers */ div.iu-controller > hr { display: none } /* Hide the line seperating zones */ div.iu-zones > hr { display: none } /* Hide the line seperating sequences */ div.iu-sequences > hr { display: none } /* Hide the zone and sequence buttons */ div.iu-control-panel { display: none } /* Hide the controller menu */ div.iu-controller-row .iu-td7 { visibility: hidden } /* Hide the zone menu */ div.iu-zone-row .iu-td7 { visibility: hidden } /* Hide the sequence menu */ div.iu-sequence-row .iu-td7 { visibility: hidden } /* Hide the sequence zone menu */ div.iu-sequence-zone-row .iu-td7 { visibility: hidden } /* Hide the 2nd zone on controller 1 */ div.iu-zone[iu-key="1.2.0.0"] { display: none } /* Hide the 4th sequence on controller 1 */ div.iu-sequence[iu-key="1.0.4.0"] { display: none } ``` -------------------------------- ### Track Zone and Sequence Status in IUController Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Manages the status of zones and sequences within a controller, providing methods to check pause/resume states and look up zone names. The `update` method recursively updates its children. ```typescript export class IUController extends IUEntity { public controller_id: string; public zones: IUZone[] = []; public sequences: IUSequence[] = []; // Returns bitmask: bit 0 = any sequence "on", bit 1 = any sequence "paused" public pause_resume_status(): number { let result = 0; for (const s of this.sequences) { if (s.status === "on") result |= 1; // pause button visible if (s.status === "paused") result |= 2; // resume button visible } return result; } public lookup_zone_name(zone_id: string): string | undefined { for (const z of this.zones) if (z.zone_id === zone_id) return z.name; return undefined; } public override update(hass: HomeAssistant): number { let result = super.update(hass); // updates controller entity for (const z of this.zones) result |= z.update(hass); for (const s of this.sequences) result |= s.update(hass); return result; } } ``` -------------------------------- ### Adjust Time Service (`_serviceAdjust`) Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Adjusts the run time of a zone or sequence using various modes (percentage, absolute, increase, decrease, reset) via the `irrigation_unlimited.adjust_time` service. ```APIDOC ## Service Calls — Adjust Time (`_serviceAdjust`) Parses an adjustment string and calls `irrigation_unlimited.adjust_time`. Supports percentage, absolute, increase, decrease, and reset modes. ### Method POST ### Endpoint /api/services/irrigation_unlimited/adjust_time ### Parameters #### Request Body - **entity_id** (string) - Required - The entity ID of the zone or sequence to adjust. - **percentage** (string) - Optional - Run at a percentage of the scheduled duration (e.g., "80"). - **actual** (string) - Optional - Run for an exact duration in `h:mm:ss` format (e.g., "0:20:00"). - **increase** (string) - Optional - Add time in `h:mm:ss` format (e.g., "0:05:00"). - **decrease** (string) - Optional - Subtract time in `h:mm:ss` format (e.g., "0:05:00"). - **reset** (null) - Optional - Remove all adjustments. Use `null` for the value. ### Request Example Set to 80% duration: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1", "percentage": "80" } ``` Run for exactly 20 minutes: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1", "actual": "0:20:00" } ``` Add 5 minutes: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1", "increase": "0:05:00" } ``` Subtract 5 minutes: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1", "decrease": "0:05:00" } ``` Reset adjustments: ```json { "entity_id": "binary_sensor.irrigation_unlimited_c1_z1", "reset": null } ``` ### Response #### Success Response (200) An empty object or a success message from the Home Assistant API. ``` -------------------------------- ### Adjust Irrigation Unlimited Run Time Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Calls `irrigation_unlimited.adjust_time` to modify run durations. Supports percentage, absolute, increase, decrease, and reset modes. The input format determines the adjustment type. ```typescript // src/irrigation-unlimited-card.ts private _serviceAdjust(e: Event): void { if (this._isNotEnterKey(e)) return; const data = this._build_data(e); if (!data) return; const adjustElement = /* ... */ as HTMLInputElement; const value = adjustElement.value; // Adjustment format examples and resulting service data: // "%80" → data["percentage"] = "80" (run at 80% of scheduled duration) // "=0:20:00" → data["actual"] = "0:20:00" (run for exactly 20 minutes) // "+0:05:00" → data["increase"] = "0:05:00" (add 5 minutes) // "-0:05:00" → data["decrease"] = "0:05:00" (subtract 5 minutes) // "" → data["reset"] = null (remove all adjustments) switch (value.slice(0, 1)) { case "%": data["percentage"] = value.slice(1); break; case "=": data["actual"] = value.slice(1); break; case "+": data["increase"] = value.slice(1); break; case "-": data["decrease"] = value.slice(1); break; case "": data["reset"] = null; break; default: return; } this.hass.callService("irrigation_unlimited", "adjust_time", data); } ``` -------------------------------- ### Pause and Resume Irrigation Unlimited Sequences Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Pauses or resumes all sequences of a controller. Setting `sequence_id` to "0" applies the action to all sequences. Ensure the correct entity ID is provided. ```typescript // src/irrigation-unlimited-card.ts private _servicePause(e: Event): void { const data = this._build_data(e); if (!data) return; data["sequence_id"] = "0"; // 0 = all sequences this.hass.callService("irrigation_unlimited", "pause", data); this._toggleMenu(e); } private _serviceResume(e: Event): void { const data = this._build_data(e); if (!data) return; data["sequence_id"] = "0"; this.hass.callService("irrigation_unlimited", "resume", data); this._toggleMenu(e); } // service: irrigation_unlimited.pause // target: { entity_id: "binary_sensor.irrigation_unlimited_c1_m" } // data: { sequence_id: "0" } ``` -------------------------------- ### Suspend or Reset Irrigation Unlimited Schedule Source: https://context7.com/rgc99/irrigation-unlimited-card/llms.txt Calls `irrigation_unlimited.suspend` to pause scheduled runs for a specified duration or `reset` to lift an existing suspension. The duration is provided in `h:mm:ss` format. ```typescript // src/irrigation-unlimited-card.ts private _serviceSuspend(e: Event): void { if (this._isNotEnterKey(e)) return; const data = this._build_data(e); if (!data) return; const timeElement = (e.target as Element) .closest(".iu-menu-item") ?.querySelector(".iu-time-input") as HTMLInputElement; if (timeElement.value) data["for"] = timeElement.value; // e.g. "2:00:00" → suspend 2 hours else data["reset"] = null; // blank input → lift suspension this.hass.callService("irrigation_unlimited", "suspend", data); // service: irrigation_unlimited.suspend // target: { entity_id: "binary_sensor.irrigation_unlimited_c1_m" } // data: { for: "2:00:00" } OR data: { reset: null } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.