| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HomeAssistant.Common.Notify
Description
Implements
Synopsis
- data NotificationData (platform :: NotificationPlatform) where
- OtherNotificationData :: Value -> NotificationData 'OtherPlatform
- AppleNotificationData :: AppleNotificationData -> NotificationData 'Apple
- data Notification (platform :: NotificationPlatform)
- notification :: forall (platform :: NotificationPlatform). Text -> Notification platform
- setNotificationTitle :: forall (platform :: NotificationPlatform). Maybe Text -> Notification platform -> Notification platform
- setNotificationData :: forall (platform :: NotificationPlatform). Maybe (NotificationData platform) -> Notification platform -> Notification platform
- notify :: forall (platform :: NotificationPlatform). Text -> Notification platform -> HA Value
Documentation
data NotificationData (platform :: NotificationPlatform) where Source #
Represents platform-specific data for a notification.
Constructors
| OtherNotificationData :: Value -> NotificationData 'OtherPlatform | A general constructor that can be used to pass arbitrary JSON data to the notification provider. |
| AppleNotificationData :: AppleNotificationData -> NotificationData 'Apple |
Instances
| ToJSON (NotificationData platform) Source # | |
Defined in HomeAssistant.Common.Notify Methods toJSON :: NotificationData platform -> Value # toEncoding :: NotificationData platform -> Encoding # toJSONList :: [NotificationData platform] -> Value # toEncodingList :: [NotificationData platform] -> Encoding # omitField :: NotificationData platform -> Bool # | |
| Show (NotificationData platform) Source # | |
Defined in HomeAssistant.Common.Notify Methods showsPrec :: Int -> NotificationData platform -> ShowS # show :: NotificationData platform -> String # showList :: [NotificationData platform] -> ShowS # | |
| Eq (NotificationData platform) Source # | |
Defined in HomeAssistant.Common.Notify Methods (==) :: NotificationData platform -> NotificationData platform -> Bool # (/=) :: NotificationData platform -> NotificationData platform -> Bool # | |
data Notification (platform :: NotificationPlatform) Source #
Instances
notification :: forall (platform :: NotificationPlatform). Text -> Notification platform Source #
notification message constructs a Notification containing message.
Can be used to then change other properties of the resulting Notification.
setNotificationTitle :: forall (platform :: NotificationPlatform). Maybe Text -> Notification platform -> Notification platform Source #
setNotificationTitle title notification sets notification's title.
setNotificationData :: forall (platform :: NotificationPlatform). Maybe (NotificationData platform) -> Notification platform -> Notification platform Source #
setNotificationData data notification sets notification's data.
notify :: forall (platform :: NotificationPlatform). Text -> Notification platform -> HA Value Source #
notify device notification is a wrapper around callService that uses
the notifications service to send notification to device.