home-assistant-client-0.1.0.0: Client library for the Home Assistant API.
Safe HaskellNone
LanguageHaskell2010

HomeAssistant.Client

Description

Client library for the Home Assistant API.

Synopsis

Documentation

type API = "api" :> Endpoints Source #

The Home Assistant API as a type.

type JSONOptions (prefix :: Symbol) = '[OmitNothingFields, FieldLabelModifier '[StripPrefix prefix, CamelToSnake]] Source #

The custom JSON encoding/decoding options for HA types.

HA does not like fields that are set to null - they must be omitted.

data StateChange Source #

Represents information about the state of an entity.

Instances

Instances details
FromJSON StateChange Source # 
Instance details

Defined in HomeAssistant.Client

ToJSON StateChange Source # 
Instance details

Defined in HomeAssistant.Client

Generic StateChange Source # 
Instance details

Defined in HomeAssistant.Client

Associated Types

type Rep StateChange 
Instance details

Defined in HomeAssistant.Client

type Rep StateChange = D1 ('MetaData "StateChange" "HomeAssistant.Client" "home-assistant-client-0.1.0.0-52CqQ6sONoKHixgMqSwY6f" 'False) (C1 ('MetaCons "MkStateChange" 'PrefixI 'True) ((S1 ('MetaSel ('Just "stateChangeAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "stateChangeEntityID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "stateChangeLastChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "stateChangeState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))
Show StateChange Source # 
Instance details

Defined in HomeAssistant.Client

Eq StateChange Source # 
Instance details

Defined in HomeAssistant.Client

type Rep StateChange Source # 
Instance details

Defined in HomeAssistant.Client

type Rep StateChange = D1 ('MetaData "StateChange" "HomeAssistant.Client" "home-assistant-client-0.1.0.0-52CqQ6sONoKHixgMqSwY6f" 'False) (C1 ('MetaCons "MkStateChange" 'PrefixI 'True) ((S1 ('MetaSel ('Just "stateChangeAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "stateChangeEntityID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "stateChangeLastChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "stateChangeState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))

callService :: Text -> Text -> Maybe Value -> HA Value Source #

callService domain service body calls service in domain with an optional body. The result depends on the service.