A Device Trigger entity for Homex
Implements a Homex.Entity. See module for available callbacks.
https://www.home-assistant.io/integrations/device_trigger.mqtt/
Options
:name(String.t/0) - Required. the name of the entity:enabled_by_default(boolean/0) - Flag which defines if the entity should be enabled when first added. The default value istrue.:payload(String.t/0) - Optional payload to match the payload being sent over the topic. The default value is"action".:type(String.t/0) - The type of the trigger, e.g. button_short_press.. The default value is"button_short_press".:subtype(String.t/0) - The subtype of the trigger, e.g. button_1. The default value is"button_1".
Example
defmodule MyDevice do
use Homex.Entity.DeviceTrigger, name: "my-device"
endTrigger using the trigger/0 function
iex> MyDevice.trigger()
:ok