Zone.more parameters
evercape opened this issue · 6 comments
Is your feature request related to a problem? Please describe.
Zone(s) currently have a name and other irrigation_unlimited specific parameters that are vital to the functionality of the controller. However, it would be nice to add other parameters that can be accessed as attributes in UI, for instance the area/region of a zone, or how the zone is connected via a manifold/actuator on DB board, the flow rate of a zone, a picture URL, GPS coordinates (if you are on a farm that would be helpful for viewing on a map) or any other descriptive information.
Describe the solution you'd like
irrigation_unlimited:
controllers:
zones:
- name: "My Zone 1"
entity_id: switch.my_switch1
more:
area: Eastern Pastures
actuator: KNX 6.1
flow_rate_gallon_per_minute: 25
picture: /my_pic.jpg
gps: 42.746635,-75.770045
and then access this information via attribute state ie:
binary_sensor.irrigation_unlimited_c1_m.more_area
binary_sensor.irrigation_unlimited_c1_m.more_actuator
and so on. Basically a parsing of YAML more: and then passing it on as attribute to respective zone (possibly even controller).
What is useful to then be able to access this information in UI cards via the attributes, in particular via the functionality within [entity-multiple-row](type: custom:multiple-entity-row).
Describe alternatives you've considered
Obviously, one could just replicate the existing binary_sensors but since all the coding/settings of irrigation unlimited happens within YAML this would be a helpful addition to its otherwise really awesome functionality.
This is a straight pass through of arbitrary static user defined data. Elements are prefixed and presented as attributes in the entities. Sounds straight forward enough.
Changes are in the repository. I changed more:
to user:
. It's in the all_zones:
and controller:
objects as well. Here is an example.
controllers:
- name: "Test controller 1"
user:
area: My Farm
picture: /my_pic.jpg
all_zones_config:
user:
actuator: KNX 6.1
zones:
- name: "Zone 1"
user:
area: Eastern Pastures
flow_rate_gallon_per_minute: 25
picture: /my_pic.jpg
gps: 42.746635,-75.770045
- name: "Zone 2"
Try it out with a manual install from the repository and let me know.
Cheers
Thanks Robert,
It works very well and amazing how quickly you turn around new feature requests. I doubt any commercial business has these kind of timelines ;-).
Thanks for also including on 'controller' level that is a great idea and I missed that in my request. I like that you changed more->user which is more appropriate.
On that note, I wonder if this 'user data' should not also be applied to schedule and sequence schema. At the end of the day, if not too much work, it might help with front end functionality in cards and/or automation.
Please let me know if you need help with documentation, happy to write something about the new 'more object'.
Cheers
Martin
Pleasure, I am interested in making sequences their own entity and would probably make sense then to include user data. Problem with adding to something like schedules is it is buried within the object and difficult to get at within a card. Most cards support attributes but not elements of objects within them as this requires templating.
Can always use a hand with documentation.
Thanks for adding this feature request. Documentation is updated, so closing the ticket now.