I am having some difficulty adding custom defined MQTT Sensor.
This is Home Assistant Docker Container (Home Assistant Core ?) 2024.3.1 with Frontend 20240307.0 running under Podman (similar to Docker).
Configuration is fine, no errors reported, after tweaking it a bit.
Reloaded configuration, logs are fine, even restarted HomeAssistant.
No matter what I do, the sensors do NOT appear as entities/etc that I can display.
They are also NOT listed in States under Developer Tools.
configuration.yaml
# Loads default set of integrations. Do not remove.
default_config:
http:
# ip_ban_enabled: true
# login_attempts_threshold: 5
use_x_forwarded_for: true
trusted_proxies:
# IP address of the proxy server
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
- 127.0.0.1
# - localhost
# - traefik
- ::1
- fe80::/64
- fe00::/64
- fd00::/64
mqtt: !include mqtt.yaml
#http:
# ssl_certificate: /ssl/homeassistant.crt
# ssl_key: /ssl/homeassistant.key
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt.yaml
sensor:
- name: "East Outdoor Humidity"
device_class: "humidity"
state_topic: "weather-station/east/loop"
unit_of_measurement: "%"
value_template: "{{ value_json.outHumidity | float | round(0) }}"
- name: "East Outdoor Temperature"
device_class: "temperature"
state_topic: "weather-station/east/loop"
unit_of_measurement: "°C"
value_template: "{{ value_json.outTemperature | float | round(1) }}"
- name: "East Outdoor Solar Radiation"
device_class: "irradiance"
state_topic: "weather-station/east/loop"
unit_of_measurement: "W/m²"
value_template: "{{ value_json.radiation_Wpm2 | float | round(0) }}"
- name: "East Outdoor Wind Average Speed"
device_class: "wind_speed"
state_topic: "weather-station/east/loop"
unit_of_measurement: "km/h"
value_template: "{{ value_json.windSpeed_kph | float | round(1) }}"
- name: "East Outdoor Wind Gust Speed"
device_class: "wind_speed"
state_topic: "weather-station/east/loop"
unit_of_measurement: "km/h"
value_template: "{{ value_json.windGust_kph | float | round(1) }}"
Where are these “sensors” (or “states”, “entities”, …) supposed to appear within HomeAssistant, so I can display them (e.g. as an entity, a history graph, …) ?
I read this but unfortunately it doesn’t clearly mention why entities/sensors/etc don’t show up
Do I need to add the “second” part of MQTT Sensor - Home Assistant so that these sensors are listed correctly ? Is this what is missing in my case ?
unique_id: "hp_1231232_ts_on"
device:
name: "Heat pump"
identifiers:
- "hp_1231232"
Thank you for your help.