Configuring Home Assistant is purely optional as this project will work great even without it. This guide assumes you already have a working and running Home Assistant server. If you don't, be sure to visit our Set up Home Assistant with a Raspberry Pi guide first.
Check Your Add-Ons
Start out by logging in and opening up your Home Assistant dashboard and checking that the File editor is installed.
As part of the setup, you should have an add-on either called configurator or File editor with a wrench icon next to it. Go ahead and select it.
If you don't see it, it may not be installed. You can find it under Supervisor → Add-on Store → File editor and go through the installation procedure.
If you already have it, but it's just not showing up, be sure it is started and the option to show in the sidebar is selected.
Creating a Switched Outlet
In order to control the switched outlet with Home Assistant, you'll want to add the following code to your configuration.
switch funhouse_outlet: - platform: mqtt name: "FanHouse" command_topic: "funhouse/outlet/set" state_topic: "funhouse/outlet/state" payload_on: "on" payload_off: "off"
If you have the Check Home Assistant configuration tool installed, now would be a good time to run it. It takes several minutes to run and you can check the log tab to see the results.
From the Configuration menu, choose Server Controls. Here you can check that the configuration is valid and click on Restart to load the configuration changes you made.
With the latest releases of Home Assistant, a LoveLace dashboard was added. If you haven't edited the Dashboard, it should automatically appear.
Otherwise, you may need to manually add a switch card to the dashboard.
The FanHouse switch should appear under your switches.
Troubleshooting
If you see the icons, but there is no data, it is easiest to start by checking the MQTT messages. Adafruit has a guide on how to use Desktop MQTT Client for Adafruit.io, which can be used for the Home Assistant MQTT server as well.
Go ahead and configure a username and password to match your MQTT server and connect. Under subscribe, you can subscribe to the #
topic to get all messages.
If you are seeing messages from the sensor, you may want to double check your Home Assistant configuration.
If you don't see any messages, you will want to follow the debugging section on the Code the Sensor page.