Home assistant crashes when adding a basic cut and paste of mqtt sensor

Why does home assistant constantly crash out when making even basic changes? I just started attempting to use home assistant coming from node red. Which at this point seems much more stable.

The web interface crashes out, but the config file passes the error check.

mqtt:
broker: 10.1.14.131
port: 1883
client_id: home-assistant-1
username: sdfasdfasd
password: asdfasdfadfasdf

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:

  • 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) }}’

  • platform: mqtt
    state_topic: “bruh/sensornode1”
    name: “SN1 Real Feel”
    unit_of_measurement: “°F”
    value_template: ‘{{ value_json.heatIndex | round(1) }}’

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

Someone’s gonna come along and tell you to properly format your code blocks… so I’ll do it …
properly format your code blocks… Its hard to evaluate anything without seeing what it really is.

2 Likes

configuration.yaml (3.2 KB)

I believe you need to specify every sensor separately.

Look into doing an !include sensors.yaml

https://github.com/bruhautomation/ESP-MQTT-JSON-Multisensor I take the video that goes along with this and the repo is outdated with a newer version of ha? He pastes it right in configuration.yaml in the video.

Making it a seperate file seems like a better idea like you say, do you see any problem with the config. I know for sure the mqtt feed is working because I have been using it node-red.

other than the sensor section it looks good, but I’d look at migrating it to a separate file.

Not sure if it matters, but I’m using a raspbery pi 2. It’s fresh install. Any issues with the latest version? Any commands to look at the crash log via ssh?

I created a folder called sensors, added an entry sensor: !include_dir_list sensors/ , and created a sensors/sensor1.yaml

I get zero errors, and nothing on the dashboard. I can add this in node-red in 2 minutes.

Any ideas?

If you’re in fact adding it you can go into dev tools to see if it’s actually created.

this is my garage door opener

- platform: mqtt
  name: Garage Door Status
  state_topic: "ha/garage_door_status"
  retain: false

inside a yaml file,

my configuration.yaml says

sensor: !include_dir_merge_list includes/sensors/

Thanks! That worked. I did find I had to cut the power to the device a few times as it doesn’t restart properly.

I also found that there were two “sensor” sections. There’s one in there by default for weather.