Hello-
I am setting up an MQTT sensor following the excellent Bruh tutorial, but the only thing that shows up is the light component (which works great). One difference between the LED and the sensors is the platform (mqtt vs mqtt_json) The sensor appears to be functioning great when I look at the serial monitor in the Arduino IDE, and I have verified that the MQTT server is up and running too. I am running HA on an R Pi with a manual installation in a venv. I have set up this Bruh Sensor successfully many times in other HA instances. I am not getting any errors in the UI. Below is my config, happy to supply any other documentation.
-R
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: x
longitude: x
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: x
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
mqtt:
broker: xxx.xxx.xx.xxx
port: 1883
client_id: x
# keepalive: 60
username: x
password: x
light:
- platform: mqtt_json
name: "SN1 LED"
state_topic: "bruh/sensornode1"
command_topic: "bruh/sensornode1/set"
brightness: true
flash: true
rgb: true
optimistic: false
qos: 0
sensor:
#SENSOR NODE 1
- platform: mqtt
state_topic: "bruh/sensornode1"
name: "SN1 Humidity"
unit_of_measurement: "%"
value_template: '{{ value_json.humidity | round(1) }}'
- platform: mqtt
state_topic: "bruh/sensornode1"
name: "SN1 LDR"
##This sensor is not calibrated to actual LUX. Rather, this a map of the input voltage ranging from 0 - 1023.
unit_of_measurement: "LUX"
value_template: '{{ value_json.ldr }}'
- platform: mqtt
state_topic: "bruh/sensornode1"
name: "SN1 PIR"
value_template: '{{ value_json.motion }}'
- platform: mqtt
state_topic: "bruh/sensornode1"
name: "SN1 Temperature"
unit_of_measurement: "°F"
value_template: '{{ value_json.temperature | round(1) }}'
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Secrets are defined in the file secrets.yaml
# api_password: !secret http_password
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
# Text to speech
tts:
- platform: google
group: !include groups.yaml
#group:
# sensor_node_1_card:
# name: Sensor Node 1
# entities:
# - sensor.sn1_temperature
# - sensor.sn1_humidity
# - sensor.sn1_ldr
# - sensor.sn1_pir
# - light.sn1_led
automation: !include automations.yaml
script: !include scripts.yaml