Giter VIP home page Giter VIP logo

Comments (6)

rautesamtr avatar rautesamtr commented on July 19, 2024 1

What do you say to add this as additional option for the sensor list element so it would be easy to create blocks with and without polling and add an cascading effect.
e.g.

thermal_comfort:
    #sensors with poll
  - poll: true
    scan_interval: 60
    sensor:
      - name: Garage
        temperature_sensor: sensor.garage_temperature
        humidity_sensor: sensor.garage_humidity
        unique_id: garage
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

      - name: Guest Bath
        temperature_sensor: sensor.guest_bath_temperature
        humidity_sensor: sensor.guest_bath_humidity
        unique_id: guest_bath
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

        # Single sensor without poll
      - poll: false
        name: Hall
        temperature_sensor: sensor.hall_temperature
        humidity_sensor: sensor.hall_humidity
        unique_id: hall
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

   # list of sensors without poll
    - sensor:
      - name: Lanai
        temperature_sensor: sensor.lanai_temperature
        humidity_sensor: sensor.lanai_humidity
        unique_id: lanai
        sensor_types:
          - absolute_humidity
          - dew_point
          - frost_point
          - frost_risk
          - simmer_index

      - name: Laundry
        temperature_sensor: sensor.laundry_temperature
        humidity_sensor: sensor.laundry_humidity
        unique_id: laundry
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

      - name: Master Bath
        temperature_sensor: sensor.master_bath_temperature
        humidity_sensor: sensor.master_bath_humidity
        unique_id: master_bath
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

      - name: Master Bed
        temperature_sensor: sensor.master_bed_temperature
        humidity_sensor: sensor.master_bed_humidity
        unique_id: master_bed
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

      - name: Office
        temperature_sensor: sensor.office_temperature
        humidity_sensor: sensor.office_humidity
        unique_id: office
        sensor_types:
          - absolute_humidity
          - dew_point
          - simmer_index

      - name: Porch
        temperature_sensor: sensor.porch_temperature
        humidity_sensor: sensor.porch_humidity
        unique_id: porch
        sensor_types:
          - absolute_humidity
          - dew_point
          - frost_point
          - frost_risk
          - simmer_index

from thermal_comfort.

rautesamtr avatar rautesamtr commented on July 19, 2024 1

Could you try #133? it should make something like this possible:

thermal_comfort:
  - poll: true
    scan_interval: 60
    sensor_types:
      - absolute_humidity
      - dew_point
      - simmer_index

    sensor:
      - name: Garage
        temperature_sensor: sensor.garage_temperature
        humidity_sensor: sensor.garage_humidity
        unique_id: garage

      - name: Guest Bath
        temperature_sensor: sensor.guest_bath_temperature
        humidity_sensor: sensor.guest_bath_humidity
        unique_id: guest_bath

      - name: Hall
        temperature_sensor: sensor.hall_temperature
        humidity_sensor: sensor.hall_humidity
        unique_id: hall

      - name: Laundry
        temperature_sensor: sensor.laundry_temperature
        humidity_sensor: sensor.laundry_humidity
        unique_id: laundry

      - name: Master Bath
        temperature_sensor: sensor.master_bath_temperature
        humidity_sensor: sensor.master_bath_humidity
        unique_id: master_bath

      - name: Master Bed
        temperature_sensor: sensor.master_bed_temperature
        humidity_sensor: sensor.master_bed_humidity
        unique_id: master_bed

      - name: Office
        temperature_sensor: sensor.office_temperature
        humidity_sensor: sensor.office_humidity
        unique_id: office

  - poll: true
    scan_interval: 60
    sensor_types:
          - absolute_humidity
          - dew_point
          - frost_point
          - frost_risk
          - simmer_index

     sensor:
       - name: Porch
         temperature_sensor: sensor.porch_temperature
         humidity_sensor: sensor.porch_humidity
         unique_id: porch

       - name: Lanai
         temperature_sensor: sensor.lanai_temperature
         humidity_sensor: sensor.lanai_humidity
         unique_id: lanai

from thermal_comfort.

lymanepp avatar lymanepp commented on July 19, 2024

Looks good to me. Since sensor_types makes up much of my configuration, it would also be nice to have sensor_types work like that.

from thermal_comfort.

rautesamtr avatar rautesamtr commented on July 19, 2024

I have an idea how this probably could be implemented nicely. We should also include custom_icons.

from thermal_comfort.

lymanepp avatar lymanepp commented on July 19, 2024

Other than a minor YAML format issue (extra space in the last 'sensor' section), this works great! The configuration is much nice with no duplicated values. Thanks for this!

from thermal_comfort.

rautesamtr avatar rautesamtr commented on July 19, 2024

Closed with #133

from thermal_comfort.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.