Menu

Skip to content
Sytone's Ramblings
  • Home
  • About

Sytone's Ramblings

the occasional posts of a guy who plays with technology

Tag: Microsoft Flow

Using Microsoft Flow with Home Assistant

Posted on November 3, 2016 by Sytone

Now that Microsoft Flow is out of Beta I thought I would play with it and integrate it with Home Assistant running my house. The Microsoft Flow is fairly flexible and has more flow options than IFTTT to make choices.

To use this with Home Assistant I am going to use the REST API to make and set a sensor value, you can then take this and make it as complicated as you want. 🙂

Settings

You need to ensure you have this information at hand.
* Home Assistant Endpoint – https://publicdomin:optionalPort/api
* Your password for the http component. If you public expose HA without a password, stop and fix it now!
* The name of the sensor you want to update. sensor.kitchen_temperature in this case.

  1. Go to https://flow.microsoft.com and login.
  2. Make a new Flow from a blank template
  3. Search for button (you can use other triggers but this is an easy start)
  4. Add a new step of type action.
  5. Select HTTP
  6. Change Method to POST
  7. In URI put the full URI of the sensor you want to change. Using the data above this is https://publicdomin:optionalPort/api/states/sensor.kitchen_temperature
  8. In headers add the following JSON blob.
    {
    “x-ha-access”: “YOURPASSWORD”,
    “Content-Type”: “application/json”
    }
  9. In Body put the JSON to update the sensor.
    {
    “state”: “25”,
    “attributes”: {
    “unit_of_measurement”: “°C”
    }
    }
  10. Save the Flow!

Now open up Flow on your phone and log in with the same account, you will see a nice big button with manual -> HTTP on it. Click that button and look at the state of the sensor in Home Assistant. You will see it with the value you set in the body.

To trouble shoot, in the web UI click on the i with a circle around it. It will show a log of successes and failures. If you click on that you can drill into the details of the flow and the responses from Home Assistant.

Share this:

  • Email
  • Print
  • Reddit
  • Twitter
  • Pocket
  • Pinterest
Posted in Home Assistant Home Automation | Tagged API Home Assistant Home Automation JSON Microsoft Microsoft Flow | Leave a comment

Tags

API autohotkey Binding c# cache Content Deployment development engineering forge Games General Gnomoria hack Home Assistant Home Automation hosting ISO ISY JSON libraries Microsoft Microsoft Flow minecraft MoCA mod network openhab outlook paper PowerShell REST Security SharePoint site SQL toodledo troubleshooting Tweak Visual Studio Visual Studio Code windows 7 Windows 8 Windows Phone winkhub XAML

Recent Posts

  • iPhone hotspot issues? Getting it to work with windows.
  • Getting a DietPi image running on Hyper-V
  • Getting HP Officejet Pro 8620 scan to network working…
  • Developing Home Assistant on Windows using the Subsystem for Linux
  • Using Microsoft Flow with Home Assistant

Recent Comments

  • Shrabean on Automating OneNote with AutoHotKey to be a Journal V1.1
  • danbutter on Integrating ISY into OpenHAB
  • Sytone on Integrating ISY into OpenHAB
  • rick Sumter on Integrating ISY into OpenHAB
  • Sytone on Automating OneNote with AutoHotKey to be a Journal V1.1

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Proudly powered by WordPress
Theme: Flint by Star Verte LLC
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.