kloggy / HA-Irrigation-Version2

221 stars 55 forks source link

Feature Request: Monitor more than one Wifi Controller #71

Open ekkesa opened 2 years ago

ekkesa commented 2 years ago

The ability to monitor more than one Wi-Fi controller.

Use Case: I have 4x 4-channel Wi-Fi controllers running my irrigation lines. Currently I added my furthest controller to be monitored, but would like to monitor all of them.

Thank you!

genestealer commented 2 years ago

A straightforward solution, which does not require modification to kloggy's code: Create a templated sensor State-based template binary sensors, which only becomes "true" when all of your controllers are "online". Multiple ways to approach this, simplest may be:

template:
  - binary_sensor:
      - name: contollers_all
        state: >
          {{ is_state('binary_sensor.irrigation_controller_1', 'online')
             and is_state('binary_sensor.irrigation_controller_2', 'online')
             and is_state('binary_sensor.irrigation_controller_3', 'online')
             and is_state('binary_sensor.irrigation_controller_4', 'online')
             and is_state('binary_sensor.irrigation_controller_5', 'online')
             and is_state('binary_sensor.irrigation_controller_6', 'online')
             and is_state('binary_sensor.irrigation_controller_7', 'online') }}

I would suggest testing this in the developer tool template tab, and you will need to replace the 'online' with whatever state your controller provides to say when it online.

@kloggy I would suggest closing this, but perhaps adding it to a Q&A if you have one?

ekkesa commented 2 years ago

@genestealer Thank you for the suggestion, but @kloggy's implementation has a bit more than just a simple binary sensor. It also shows signal strength etc.

genestealer commented 9 months ago

@ekkesa My controllers are ethernet cable connected, so have not seen the wifi part. I think showing more than one wifi signal is a bit of an edge case though.

I would suggest still suggest closing this, but @kloggy perhaps adding it to a Q&A (this part: https://github.com/kloggy/HA-Irrigation-Version2/issues/71#issuecomment-1101552235)