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

cron utility meter strange after reset #56865

Closed
merc1031 opened this issue Oct 1, 2021 · 3 comments
Closed

cron utility meter strange after reset #56865

merc1031 opened this issue Oct 1, 2021 · 3 comments

Comments

@merc1031
Copy link
Contributor

merc1031 commented Oct 1, 2021

The problem

My cron:"* 17 L * *" utility meter reset properly, but then did this odd flapping behaviour.
image
I have a cycle: daily usage meter that seems to be behaving properly
image
They both look at the same source data

What is version of Home Assistant Core has the issue?

core-2021.9.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

utility_meter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/utility_meter/

Example YAML snippet

sensor:
  - platform: snmp
    name: 'USG-Pro-4 WAN In bytes'
    host: 192.168.1.1
    baseoid: 1.3.6.1.2.1.31.1.1.1.6.4
    community: 'public'
    version: '2c'
    scan_interval: 5
    unit_of_measurement: 'B'
  - platform: snmp
    name: 'USG-Pro-4 WAN Out bytes'
    host: 192.168.1.1
    baseoid: 1.3.6.1.2.1.31.1.1.1.10.4
    community: 'public'
    version: '2c'
    scan_interval: 5
    unit_of_measurement: 'B'

template:
  - sensor:
    - name: "USG-Pro-4 WAN Total Bytes"
      unique_id: "usg-pro-4-wan-total-bytes-b5bb0ab5-5c48-4d9a-851b-c8956c29b5b6"
      state: "{{ (states('sensor.usg_pro_4_wan_out_bytes')|float) + (states('sensor.usg_pro_4_wan_in_bytes')|float) }}"
      unit_of_measurement: 'B'
      availability: "{{ (states('sensor.usg_pro_4_wan_out_bytes')|float is number) and (states('sensor.usg_pro_4_wan_in_bytes')|float is number) }}"

utility_meter:
  usg_pro_4_wan_data_total_usage_monthly_bytes:
    name: "USG Pro 4 WAN Data Total Usage Monthly Bytes"
    source: sensor.usg_pro_4_wan_total_bytes
    cron: "* 17 L * *"
  usg_pro_4_wan_data_total_usage_daily_bytes:
    name: "USG Pro 4 WAN Data Total Usage Daily Bytes"
    source: sensor.usg_pro_4_wan_total_bytes
    cycle: daily


### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_
@probot-home-assistant
Copy link

Hey there @dgomes, mind taking a look at this issue as it has been labeled with an integration (utility_meter) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


utility_meter documentation
utility_meter source
(message by IssueLinks)

@dgomes
Copy link
Contributor

dgomes commented Oct 1, 2021

It's you cron pattern: "* 17 L * *"

This means reset every minute when it's 17h

should be "0 17 L * *"

@dgomes dgomes closed this as completed Oct 1, 2021
@merc1031
Copy link
Contributor Author

merc1031 commented Oct 1, 2021

Thanks! haha. use cron all the time. single character typo blindness

@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants