-
Notifications
You must be signed in to change notification settings - Fork 15
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
Hello there is no problem, rather a question. #5
Comments
It should work by providing only the duration:
Let me know if this doesn't work / is inaccurate. The |
Double check you are on version 1.3! I've been adding the features to make this work very recently. Otherwise, your configuration looks correct. |
Hi, |
I'm sorry I really have no idea why this is not working. I've released another version that's added a debugging mode for showing what the card thinks the duration & time remaining are. It would be helpful if you could upgrade again, add Not that I think it would make much difference to the problem at hand, but since your card has a type: custom:timer-bar-card
entities:
- binary_sensor.irrigation_unlimited_c1_m
duration: { attribute: current_duration }
start_time: { attribute: current_start } Thanks for spending time on this! |
Aha! I see the problem! Looks like I have a bug duration didn't add correctly to compute the time remaining ( I've fixed this problem in v1.6. Hopefully this one should solve the problem! |
Yikes. I know what the problem is. For weekdays, timers, and next_trigger, did you have in mind any designs of how these should be shown? |
simple text is sufficient for weekdays. Timers: think also as text next_triger: as a bar |
Hmm I can't visualize how I could fit this all into one row, unless you'd like to draw me something. For the text parts, A template sensor might fulfill your needs. Something like: template:
- sensor:
- name: "Times"
icon: mdi:clock
state: >
{% set weekdays = state_attr('switch.schedule_nachsaat_4x_taglich, 'weekdays') %}
{% set times = state_attr('switch.schedule_nachsaat_4x_taglich, 'times') %}
{{ weeekdays }} at {{ times }} For |
Thanks for this issue, I'm using Irrigation Unlimited integration too and this worked like a charm. Maybe it would be a good idea to add it to the readme near the use with openSprinkler ;) |
Thanks for the suggestion! I added a link to the readme. |
I still have to polish some things on the irrigation unlimited side, such as how to get total irrigation remaining time (instead of per zone) so I can also show a timer-bar for the whole irrigation sequence. If you like, I can make a PR with examples and how to set it up :) Just let me know if you prefer me adding a section in the readme, or should I add a new md file and link it in the readme. |
The problem I'm facing is that the whole sequence duration is stored into an attribute in a yaml format, within an array. I can get the value using this template: {{ state_attr('binary_sensor.irrigation_unlimited_c1_m', 'sequence_status')[1].duration }} But I have no idea how to pass that duration to the timer-bar card, can you help @rianadon ? Thanks! PS: I wouldn't like to create a sensor/helper/entity for duplication this value, just get it from the attribute. |
Yes, please! A PR with your examples would be much appreciated. If it's short I'd prefer the readme, otherwise I'd prefer you make another issue with the integration doc label and link it to the readme. That way there's a spot for anyone who has questions to ask them. Dealing with arrays is not something I expect to ever support in the card. If you'd like to avoid creating another sensor, maybe the config template card would help you pass in the value. I've never played with the card before, but it would be really awesome to see if it works. This is a very rough example, but perhaps something along these lines: type: 'custom:config-template-card'
variables:
DURATION: states['binary_sensor.irrigation_unlimited_c1_m'].attributes.sequence_status[1].duration
entities:
- binary_sensor.irrigation_unlimited_c1_m
card:
type: custom:timer-bar-card
entities:
- binary_sensor.irrigation_unlimited_c1_m
duration: { fixed: "${DURATION}" }
start_time: { attribute: current_start } |
Hi, Well, 2 stones, 1 bird, I had plans of playing around with config-template-card so... I can confirm timer-bar works without a problem. Here's my working example: - type: custom:config-template-card
variables:
DURATION: >-
states['binary_sensor.irrigation_unlimited_c1_m'].attributes.sequence_status[1].duration
START_TIME: >-
states['binary_sensor.irrigation_unlimited_c1_m'].attributes.sequence_status[1].start
entities:
- binary_sensor.irrigation_unlimited_c1_m
card:
type: custom:timer-bar-card
entity: binary_sensor.irrigation_unlimited_c1_m
icon: none
active_icon: mdi:sprinkler-variant
duration:
fixed: ${DURATION}
units: seconds
start_time: ${START_TIME} Anyhow, as irrigation goes on, time doesn't match accurately, but that's a problem on Irrigation Unlimited integration I think. Due to that , it has no sense to show the timer-bar and a percentage bar would be enough. |
How can I use this identity attribute?
Thanks in advance.
The text was updated successfully, but these errors were encountered: