Remote GPIO automation doesn't quite work

Hi all

I have Pi4 as my Home Assistant server. This is the control for a remote pi3 that is controlling a mushroom fruiting room with a fan and humidifier.

All is working fine, there is a BME680 sensor that reads humidity, temperature, pressure and VOC content. There are two remote GPIO switches that switch the
humidifier and fan on.

My problem is the automation doesn’t work. I can trigger the action manually but it doesn’t seem to read the change in sensor data.

Here is my /config/configuration.yaml


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

# sensors on remote pi

sensor:
- platform: mqtt
  name: 'bme680-temperature'
  state_topic: 'bme680-temperature'
  unit_of_measurement: '°C'
- platform: mqtt
  name: 'bme680-humidity'
  state_topic: 'bme680-humidity'
  unit_of_measurement: '%'
- platform: mqtt
  name: 'bme680-pressure'
  state_topic: 'bme680-pressure'
  unit_of_measurement: 'hPa'
- platform: mqtt
  name: 'bme680-air_qual'
  state_topic: 'bme680-air_qual'
  unit_of_measurement: '%'
  

# Switches on remote pi

switch:
  - platform: remote_rpi_gpio
    host: 192.168.86.178
    ports:
      12: Fan
  - platform: remote_rpi_gpio
    host: 192.168.86.178
    ports:
      11: Humidifier 

And my automations:

- id: '1618905019905'
  alias: Fan control above 26
  description: Triggers fan above 26
  trigger:
  - platform: numeric_state
    entity_id: sensor.bme680_temperature
    above: '26'
  condition:
  - condition: state
    entity_id: switch.fan
    state: 'Off'
  action:
  - service: switch.turn_on
    target:
      entity_id: switch.fan
  mode: single
- id: '1618905138664'
  alias: Fan control below 26 (Duplicate)
  description: Triggers fan above 26
  trigger:
  - platform: numeric_state
    entity_id: sensor.bme680_temperature
    below: '25'
    for: 00:00:10
  condition:
  - condition: state
    entity_id: switch.fan
    state: 'On'
  action:
  - service: switch.turn_off
    target:
      entity_id: switch.fan
  mode: single

Any help much appreciated!

I do get a check configuration error but this seems unrelated:


Invalid config for [group]: Entity ID sensor.bme680-temperature is an invalid entity ID for dictionary value @ data['group']['BME680']['entities']. Got ['sensor.bme680-temperature', 'sensor.bme680-humidity', 'sensor.bme680-pressure', 'sensor.bme680-air_qual']. (See /config/configuration.yaml, line 8).

Replying to my own post: Is this some string vs integer issue, i.e. does the automation need the input value in a different format?

Thanks