This repository revived as some installations do not successfully implement the card with the custom component.
- I have not updated the text below yet, sorry
- Add next run details
- Hide zone run option when the zone is disabled
This card works with Irrigation Component and provides an interface reflecting the configuration of the irrigation custom component. Kudos to the HA team, the card leverages the capabilities of the default entities card.
HACS installation
- Adding the repository using HACS is the simplest approach
NOTE: If you are migrating from a manual installation:
- unregister the resource /local/irrigation_card.js
- delete irrigation_card.js from config/www
Manual install
- Ensure you have advanced mode enabled in Home Assistant
- Copy irrigation-card.js to the /config/www directory in Home Assistant
- In the configuration/LoveLace dashboards page select the Resources tab
- Add the resource /local/irrigation-card.js?v=1 increment the version number if updating an exsting installation
Edit your dashboard
Add the custom card
type: (required) custom:irrigation-card
program: (required) The switch representation of the irrigation program
entities: (optional) The list of entities to show on this card. If not provided all entities are displayed. This supports multiple cards being used for a single program
show_program: (optional default true) false will result in the program information being omitted from the card
show_last_ran: (optional default true) show/hide the last ran data element
show_next_run: (optional default true) show/hide the next run data element
title: (optional) The title to be set in the card.
icon: (optional) An icon to display to the left of the title.
theme: (optional) Override the used theme for this card with any loaded theme. For more information about themes, see the frontend documentation.
header: (optional) Header widget to render an image. See header/footer documentation.
footer: (optional) Header widget to render an image. See header/footer documentation.
Example:
type: custom:irrigation-card
title: Afternoon Program
program: switch.afternoon
show_program: false
entities:
- switch.zone1
- switch.zone2
Card-Mod
Support for https://github.com/thomasloven/lovelace-card-mod. Allows you to apply CSS styles to various elements of the Home Assistant frontend.
type: custom:irrigation-card-test
program: switch.test_irrigation
entities:
- switch.dummy_2
show_program: false
card_mod:
style: |
ha-card {
background-image: url('/local/lawn.png');
--mdc-theme-primary: black;
}
Note: /local/ is the path to the /config/www directory in you home assistant install.
These are some examples, use F12 on Chrome to discover other style options. My explanation of the action are not definitive the style change can affect other components as well. There are many more style options available that will have an impact. Please share exampless and action for me to update this list.
example | action |
---|---|
background-image: url('/local/lawn.png'); | to set a background image |
background-repeat: no-repeat; | to prevent the image repeating to fill the card |
color: red; | set the general text colour |
--state-active-color: blue; | change the colour of the input_boolean icon 'on' state |
--state-switch-active-color: blue; | change the colour of switch entity icons |
--paper-item-icon-color: red; | set the icon inactive 'off' state colour |
--mdc-theme-primary: black; | set the colour of the program run/stop text |
--paper-slider-active-color: red; | change the slider colour left of the knob |
--paper-slider-knob-color: red; | knob colour when the slider is not at the minimum value |
--paper-slider-knob-start-color: red; | Knob colour when the slider is at the minimum value |
--paper-slider-pin-color: red; | colour of the slider value callout |
--paper-slider-pin-start-color: red; | colour of the slider value callout when at the minimum value |
--paper-slider-container-color: red; | colour of the line to the right of the knob |
- Add next run details
- Hide zone run option when the zone is disabled
- Grouped zones as a single zone, if all helper entities are identical
- Limit zones on card so multiple cards can be used to display a program
- Allow program data to be excluded so multiple cards can be used to display a program
- Provide relative time since the zone last ran
- Provide program level runtime
- Stopping a running zone will now only stop that zone, the program will continue
- Support Card Mod addon allowing custom backgroud and other style modifications.
- Reduce english content
- correct friendly name usage
- Initial HACS release
- Sync version with Irrigation-V5
- Refactored to work with Irrigation component V5
- is not compatible with Irrigation component V4 use v1.0.11.
- Enable Zone functionality. Prerequisite is V4.0.11 of Irrigation Component V4 to support the
- Add ability to hide/show configuration. Prerequisite is V4.0.8 of Irrigation Component V4 to support the
- Add header and footer capability
- Add run zone functionality
- Improve code
- add conditonal display of remaining time/last ran
- Add zone level remaining run time
- Register card so it appears on the list of cards
- Fixed missing config objects
- Updated error handling. More robust when incorrect object defined
- New repository