Safe Haskell | None |
---|---|
Language | Haskell2010 |
HomeAssistant.Types
Description
Types used by Home Assistant.
Synopsis
- type JSONOptions (prefix :: Symbol) = '[OmitNothingFields, FieldLabelModifier '[StripPrefix prefix, CamelToSnake]]
- data UnitSystem = MkUnitSystem {}
- data Config = MkConfig {}
- data Service = MkService {}
- data ServiceDomain = MkServiceDomain {}
Documentation
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 UnitSystem Source #
Represents units that Home Assistant is configured to use.
Constructors
MkUnitSystem | |
Fields
|
Instances
Represents Home Assistant configurations.
Constructors
MkConfig | |
Fields
|
Instances
FromJSON Config Source # | |||||
Defined in HomeAssistant.Types | |||||
ToJSON Config Source # | |||||
Generic Config Source # | |||||
Defined in HomeAssistant.Types Associated Types
| |||||
Show Config Source # | |||||
Eq Config Source # | |||||
type Rep Config Source # | |||||
Defined in HomeAssistant.Types type Rep Config = D1 ('MetaData "Config" "HomeAssistant.Types" "home-assistant-client-0.1.0.0-52CqQ6sONoKHixgMqSwY6f" 'False) (C1 ('MetaCons "MkConfig" 'PrefixI 'True) (((S1 ('MetaSel ('Just "configComponents") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "configConfigDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "configLocationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "configTimeZone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "configElevation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) :*: ((S1 ('MetaSel ('Just "configLatitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "configLongitude") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "configUnitSystem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitSystem) :*: (S1 ('MetaSel ('Just "configVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "configWhitelistExternalDirs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))))) |
Represents Home Assistant services.
Constructors
MkService | |
Fields
|
Instances
FromJSON Service Source # | |||||
Defined in HomeAssistant.Types | |||||
ToJSON Service Source # | |||||
Generic Service Source # | |||||
Defined in HomeAssistant.Types Associated Types
| |||||
Show Service Source # | |||||
Eq Service Source # | |||||
type Rep Service Source # | |||||
Defined in HomeAssistant.Types type Rep Service = D1 ('MetaData "Service" "HomeAssistant.Types" "home-assistant-client-0.1.0.0-52CqQ6sONoKHixgMqSwY6f" 'False) (C1 ('MetaCons "MkService" 'PrefixI 'True) (S1 ('MetaSel ('Just "serviceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "serviceDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "serviceFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Value))))) |
data ServiceDomain Source #
Represents Home Assistant service domains.
Constructors
MkServiceDomain | |
Instances
FromJSON ServiceDomain Source # | |||||
Defined in HomeAssistant.Types Methods parseJSON :: Value -> Parser ServiceDomain # parseJSONList :: Value -> Parser [ServiceDomain] # | |||||
ToJSON ServiceDomain Source # | |||||
Defined in HomeAssistant.Types Methods toJSON :: ServiceDomain -> Value # toEncoding :: ServiceDomain -> Encoding # toJSONList :: [ServiceDomain] -> Value # toEncodingList :: [ServiceDomain] -> Encoding # omitField :: ServiceDomain -> Bool # | |||||
Generic ServiceDomain Source # | |||||
Defined in HomeAssistant.Types Associated Types
| |||||
Show ServiceDomain Source # | |||||
Defined in HomeAssistant.Types Methods showsPrec :: Int -> ServiceDomain -> ShowS # show :: ServiceDomain -> String # showList :: [ServiceDomain] -> ShowS # | |||||
Eq ServiceDomain Source # | |||||
Defined in HomeAssistant.Types Methods (==) :: ServiceDomain -> ServiceDomain -> Bool # (/=) :: ServiceDomain -> ServiceDomain -> Bool # | |||||
type Rep ServiceDomain Source # | |||||
Defined in HomeAssistant.Types type Rep ServiceDomain = D1 ('MetaData "ServiceDomain" "HomeAssistant.Types" "home-assistant-client-0.1.0.0-52CqQ6sONoKHixgMqSwY6f" 'False) (C1 ('MetaCons "MkServiceDomain" 'PrefixI 'True) (S1 ('MetaSel ('Just "sdDomain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sdServices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Service)))) |