New PowerShell module for Home Assistant

So after making the PowerShell script for Home Assistant I decided to spend a hour and pull it together to be a full module and push it up to GitHub. This is now in place and support just turning a switch entity on and off.


Install-Module -Name PoshHomeAssistant -Scope CurrentUser


Before you can use it set the configuration, this can be done with the following command, set the key and url to match your environment.

Set-HomeAssistantConfiguration -AccessKey "YourAccessKey" -BaseUrl ""

To turn a light on and off run the following commands, they will return the state of the related entities for you to use if needed.

Set-HomeAssistantSwitchState -Entity "switch.2studylamp" -State On
Set-HomeAssistantSwitchState -Entity "switch.2studylamp" -State Off

Related Article: Getting PowerShell to work with Home Assistant


I’m a principal engineer working at Microsoft. I have run and supported services for over twenty years and worked in multiple countries. I love working with passionate people and new technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.