Smart CO2 bottle

time:
  - platform: sntp
    # ...
    on_time:

      - seconds: 0
        minutes: 0
        hours: 1
        days_of_week: MON-SUN
        then:
          - take your readings

Like this? Sorry, havenā€™t used this code snipped before.

time:
  - platform: sntp
    # ...
    on_time:

      - seconds: 0
        minutes: 0
        hours: 1
        days_of_week: MON-SUN
        then:
            sensor:
              - platform: hx711
                name: "CO2 Gewicht"
                dout_pin: GPIO4
                clk_pin: GPIO5
                gain: 128
                update_interval: 24h
                unit_of_measurement: "kg"
                icon: mdi:CO2
                accuracy_decimals: 1
                filters:
                  - calibrate_linear:
                      - -226659 -> 0
                      - -98208 -> 6.100
                device_class: weight

No way. You canā€™t create a component inside another component.
Time is one component, sensor is another component.
Your sensor is missing id, set that first
In time component you can set:

 then:
    - component.update: id_of_my_component

and
in sensor component set
update_interval: never

Thanks for your help, I also went through the ESPHome Docu to understand this more and all I add to had was the time source as my IoT Network is offline.

So this is the final config now in case someone else might find this interesting.

time:
  - platform: sntp
    servers:
     - 192.168.20.10
    on_time: 
      - seconds: 0
        minutes: 0
        hours: 1
        days_of_week: MON-SUN
        then: 
          - component.update: co2_gewicht

sensor:
  - platform: hx711
    name: "CO2 Gewicht"
    dout_pin: GPIO4
    clk_pin: GPIO5
    gain: 128
    update_interval: never
    unit_of_measurement: "kg"
    icon: mdi:CO2
    accuracy_decimals: 1
    filters:
      - calibrate_linear:
          - -226659 -> 0
          - -98208 -> 6.100
    device_class: weight
    id: co2_gewicht

Readings are now very stable.

Thatā€™s the way :+1:

1 Like