Home Assistant is a great platform to integrate all kinds of devices in a unified user interface. But sometimes you want to build your own devices, in this case it was with Elixir and Nerves. This article shows you how to build a basic system to create new devices and entities in Home Assistant and send and receive new states in both directions. Lastly it introduces Homex - a library/framework in Elixir which takes care of all that and more.