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

Zone.more parameters #143

Closed
evercape opened this issue Oct 23, 2023 · 6 comments
Closed

Zone.more parameters #143

evercape opened this issue Oct 23, 2023 · 6 comments

Comments

@evercape
Copy link
Contributor

evercape commented Oct 23, 2023

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.

@rgc99
Copy link
Owner

rgc99 commented Oct 24, 2023

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.

@rgc99
Copy link
Owner

rgc99 commented Oct 24, 2023

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

@evercape
Copy link
Contributor Author

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

@rgc99
Copy link
Owner

rgc99 commented Oct 27, 2023

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.

@evercape
Copy link
Contributor Author

Can always use a hand with documentation.

First time using GitHub pull request ;-)

#147

@evercape
Copy link
Contributor Author

Thanks for adding this feature request. Documentation is updated, so closing the ticket now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants