HomeAssistant module for the MagicMirror. Shows sensor readings from HomeAssistant:
- An installation of MagicMirror2
- request
- underscore
Navigate into your MagicMirror's modules
folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/SirUli/MMM-HASS
Navigate to the new MMM-HASS
folder and install the node dependencies.
npm install
Configure the module in your config.js
file.
To use this module, add it to the modules array in the config/config.js
file:
{
module: "MMM-HASS",
position: "top_left",
config: {
host: "your_home_assistant_ip",
port: "your_home_assistant_port",
https: false,
hassiotoken: true,
token: "your_home_assistant_long-lived_access_token",
debuglogging: false,
updateInterval: 60 * 1000,
devices: [
{ deviceLabel: "Exterior",
deviceReadings: [
{ sensor: "sensor.netatmo_outdoor_temperature", icon: "wi wi-thermometer", prefix: "", suffix: "°"},
{ sensor: "sensor.netatmo_outdoor_humidity", icon: "wi wi-humidity", suffix: "%"},
{ sensor: "sensor.netatmo_outdoor_battery", icon: "fa fa-battery-full", suffix: ""}
]
},
{ deviceLabel: "Menjador",
deviceReadings: [
{ sensor: "sensor.netatmo_indoor_temperature", icon: "wi wi-thermometer", suffix: "°", notification: "INDOOR_TEMPERATURE"},
{ sensor: "sensor.netatmo_indoor_humidity", icon: "wi wi-humidity", suffix: "%"},
{ sensor: "sensor.netatmo_indoor_co2", icon: "fa fa-leaf", suffix: ""}
]
},
{ deviceLabel: "Telèfon",
deviceReadings: [
{ sensor: "sensor.voip_status", icon: "fa fa-heart", suffix: ""},
{ sensor: "sensor.voip_lostcalls", icon: "fa fa-phone", suffix: ""}
]
}
]
}
}