packages feed

lifx-lan 0.6.1 → 0.6.2

raw patch · 6 files changed

+48/−45 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,8 @@ # Revision history for lifx-lan +## 0.6.2 -- 2022-02-02+- Update to latest products list.+ ## 0.6.1 -- 2022-02-01 - Update to latest products list. 
lifx-lan.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               lifx-lan-version:            0.6.1+version:            0.6.2 license:            BSD-3-Clause license-file:       LICENSE author:             George Thomas
src/Lifx/Internal/Product.hs view
@@ -36,26 +36,26 @@     deriving (Show)  data Features = Features-    { -- | The light supports emitting HEV light-      hev :: Bool-    , -- | The light changes physical appearance when the Hue value is changed-      color :: Bool-    , -- | The light may be connected to physically separated hardware (currently only the LIFX Tile)-      chain :: Bool-    , -- | The light supports a 2D matrix of LEDs (the Tile and Candle)-      matrix :: Bool-    , -- | The device has relays for controlling physical power to something (the LIFX Switch)-      relays :: Bool-    , -- | The device has physical buttons to press (the LIFX Switch)-      buttons :: Bool-    , -- | The light supports emitting infrared light-      infrared :: Bool-    , -- | The light supports a 1D linear array of LEDs (the Z and Beam)-      multizone :: Bool-    , -- | An array of the minimum and maximum kelvin values this device supports. If the numbers are the same then the device does not support variable kelvin values. It is null for devices that aren't lighting products (the LIFX Switch)-      temperatureRange :: Maybe (Word16, Word16)-    , -- | The more capable extended API for multizone control that lets us control all the zones on the device with a single message instead of many.-      extendedMultizone :: Bool+    { hev :: Bool+    -- ^ The light supports emitting HEV light+    , color :: Bool+    -- ^ The light changes physical appearance when the Hue value is changed+    , chain :: Bool+    -- ^ The light may be connected to physically separated hardware (currently only the LIFX Tile)+    , matrix :: Bool+    -- ^ The light supports a 2D matrix of LEDs (the Tile and Candle)+    , relays :: Bool+    -- ^ The device has relays for controlling physical power to something (the LIFX Switch)+    , buttons :: Bool+    -- ^ The device has physical buttons to press (the LIFX Switch)+    , infrared :: Bool+    -- ^ The light supports emitting infrared light+    , multizone :: Bool+    -- ^ The light supports a 1D linear array of LEDs (the Z and Beam)+    , temperatureRange :: Maybe (Word16, Word16)+    -- ^ An array of the minimum and maximum kelvin values this device supports. If the numbers are the same then the device does not support variable kelvin values. It is null for devices that aren't lighting products (the LIFX Switch)+    , extendedMultizone :: Bool+    -- ^ The more capable extended API for multizone control that lets us control all the zones on the device with a single message instead of many.     }     deriving (Eq, Ord, Show, Generic) 
src/Lifx/Internal/ProductInfo.hs view
@@ -1714,7 +1714,7 @@                         ( 1500                         , 9000                         )-                    , extendedMultizone = Nothing+                    , extendedMultizone = Just True                     }                 , upgrades = []                 }@@ -1734,7 +1734,7 @@                         ( 1500                         , 9000                         )-                    , extendedMultizone = Nothing+                    , extendedMultizone = Just True                     }                 , upgrades = []                 }@@ -1754,7 +1754,7 @@                         ( 1500                         , 9000                         )-                    , extendedMultizone = Nothing+                    , extendedMultizone = Just True                     }                 , upgrades = []                 }@@ -1774,7 +1774,7 @@                         ( 1500                         , 9000                         )-                    , extendedMultizone = Nothing+                    , extendedMultizone = Just True                     }                 , upgrades = []                 }
src/Lifx/Internal/ProductInfoMap.hs view
@@ -17,7 +17,7 @@ import Lifx.Internal.Product import Lifx.Internal.ProductInfo ---TODO RecordDotSyntax can make this and other hiding unnecessary (we could also use "id" instead of "productId"...)+-- TODO RecordDotSyntax can make this and other hiding unnecessary (we could also use "id" instead of "productId"...) import Prelude hiding (product)  productInfoMap :: Map Word32 (Features, Map Word32 ProductInfo)@@ -26,9 +26,9 @@         productInfo <&> \VendorInfo{..} ->             ( vid             ,-                ( defaults-                , Map.fromList $ (pid &&& id) <$> products-                )+              ( defaults+              , Map.fromList $ (pid &&& id) <$> products+              )             )  -- | Information about a particular LIFX product.@@ -67,7 +67,7 @@                                     upgrades                         }   where-    --TODO RecordDotSyntax+    -- TODO RecordDotSyntax     completeFeatures         Features             { ..
src/Lifx/Lan.hs view
@@ -130,7 +130,7 @@ import Lifx.Internal.Product import Lifx.Internal.ProductInfoMap ---TODO RecordDotSyntax can make this and other hiding unnecessary (we could also use "id" instead of "productId"...)+-- TODO RecordDotSyntax can make this and other hiding unnecessary (we could also use "id" instead of "productId"...) import Prelude hiding (product)  {- Device -}@@ -193,8 +193,8 @@     { hue :: Word16     , saturation :: Word16     , brightness :: Word16-    , -- | takes values in the range 1500 to 9000-      kelvin :: Word16+    , kelvin :: Word16+    -- ^ takes values in the range 1500 to 9000     }     deriving (Eq, Ord, Show, Generic) @@ -240,12 +240,12 @@  -- | https://lan.developer.lifx.com/docs/information-messages#statehostfirmware---packet-15 data StateHostFirmware = StateHostFirmware-    { -- | The timestamp of the firmware that is on the device as an epoch-      build :: Word64-    , -- | The minor component of the firmware version-      versionMinor :: Word16-    , -- | The major component of the firmware version-      versionMajor :: Word16+    { build :: Word64+    -- ^ The timestamp of the firmware that is on the device as an epoch+    , versionMinor :: Word16+    -- ^ The minor component of the firmware version+    , versionMajor :: Word16+    -- ^ The major component of the firmware version     }     deriving (Eq, Ord, Show, Generic) @@ -257,10 +257,10 @@  -- | https://lan.developer.lifx.com/docs/information-messages#stateversion---packet-33 data StateVersion = StateVersion-    { -- | For LIFX products this value is 1. There may be devices in the future with a different vendor value.-      vendor :: Word32-    , -- | The product id of the device. The available products can be found in our Product Registry.-      product :: Word32+    { vendor :: Word32+    -- ^ For LIFX products this value is 1. There may be devices in the future with a different vendor value.+    , product :: Word32+    -- ^ The product id of the device. The available products can be found in our Product Registry.     }     deriving (Eq, Ord, Show, Generic) @@ -403,8 +403,8 @@ instance MessageResult LightState  -- all `Message` response types are instances of `MessageResult`---TODO ImpredicativeTypes:--- msgResWitness :: Message r -> (forall a. MessageResult a => x) -> x+-- TODO ImpredicativeTypes:+--   msgResWitness :: Message r -> (forall a. MessageResult a => x) -> x msgResWitness :: Message r -> Dict (MessageResult r) msgResWitness = \case     GetService{} -> Dict