DavidMStraub / homeassistant-homeconnect

Custom component for Home Assistant to connect appliances supporting the Home Connect standard
MIT License
118 stars 29 forks source link

Feature Request: Washing machine program as entity #131

Open schmacka opened 3 years ago

schmacka commented 3 years ago

Playing around with the api I found that with the api call you get a lot of useful information on your current program GET /homeappliances/{haid}/programs/active

like:

` { "data": { "key": "LaundryCare.Washer.Program.Towels", "options": [ { "key": "BSH.Common.Option.EnergyForecast", "value": 100, "unit": "%", "name": "Energie" }, { "key": "LaundryCare.Common.Option.LoadRecommendation", "value": 4000, "unit": "gram", "name": "Beladungsempfehlung" }, { "key": "BSH.Common.Option.WaterForecast", "value": 80, "unit": "%", "name": "Wasser" }, { "key": "LaundryCare.Washer.Option.IntensivePlus", "value": true, "name": "Intensiv Plus" }, { "key": "LaundryCare.Washer.Option.LessIroning", "value": false, "name": "Bügelleicht" }, { "key": "LaundryCare.Washer.Option.Prewash", "value": true, "name": "Vorwäsche" }, { "key": "LaundryCare.Washer.Option.RinseHold", "value": false, "name": "Spülstopp" }, { "key": "LaundryCare.Washer.Option.RinsePlus", "value": "LaundryCare.Washer.EnumType.RinsePlus.Off", "name": "Extraspülen", "displayvalue": "Aus" }, { "key": "LaundryCare.Washer.Option.SilentWash", "value": false, "name": "Leiser waschen" }, { "key": "LaundryCare.Washer.Option.Soak", "value": false, "name": "Einweichen" }, { "key": "LaundryCare.Washer.Option.SpeedPerfect", "value": false, "name": "SpeedPerfect" }, { "key": "LaundryCare.Washer.Option.SpinSpeed", "value": "LaundryCare.Washer.EnumType.SpinSpeed.RPM1200", "name": "Drehzahl", "displayvalue": "1200 U/min" }, { "key": "LaundryCare.Washer.Option.Stains", "value": "LaundryCare.Washer.EnumType.Stains.Off", "name": "Flecken Automatik", "displayvalue": "Aus" }, { "key": "LaundryCare.Washer.Option.Temperature", "value": "LaundryCare.Washer.EnumType.Temperature.GC60", "name": "Temperatur", "displayvalue": "60°C" }, { "key": "LaundryCare.Washer.Option.WaterPlus", "value": false, "name": "Wasser Plus" }, { "key": "BSH.Common.Option.ProgramProgress", "value": 2, "unit": "%", "name": "aktueller Programmfortschritt" }, { "key": "BSH.Common.Option.RemainingProgramTime", "value": 12648, "unit": "seconds", "name": "Verbleibende Programmlaufzeit" }, { "key": "BSH.Common.Option.RemainingProgramTimeIsEstimated", "value": true, "name": "Geschätzte Restprogrammlaufzeit" }, { "key": "LaundryCare.Common.Option.ProcessPhase", "value": "LaundryCare.Common.EnumType.ProcessPhase.Prewash", "displayvalue": "Vorwaschen" } ], "name": "Handtücher" } }

Is it possible to create an entity with the returned items ? WOuld be nice to display remaining time and phase of washing program.

Mitch73-2 commented 3 years ago

This would be great if this could be added.

Rep-Hueman commented 3 years ago

This branch from the main has it all: Maybe merge this code...

https://github.com/SantaFox/homeassistant-homeconnect

Naamloos2

My own made cards:

Naamloos3 . Naamloos5 . Naamloos4

File change enum.py:

`

"""ENum values dictionary for the Home Connect integration.""" """V1.2 02-08-2021 """

enum_list = { "BSH.Common.Status.OperationState" : "Operation State",

"BSH.Common.EnumType.OperationState.Inactive" : "Inactive",
"BSH.Common.EnumType.OperationState.Ready" : "Ready",
"BSH.Common.EnumType.OperationState.DelayedStart" : "Delayed Start",
"BSH.Common.EnumType.OperationState.Run" : "Run",
"BSH.Common.EnumType.OperationState.Pause" : "Pause",
"BSH.Common.EnumType.OperationState.ActionRequired" : "Action Required",
"BSH.Common.EnumType.OperationState.Finished" : "Finished",
"BSH.Common.EnumType.OperationState.Error" : "Error",
"BSH.Common.EnumType.OperationState.Aborting" : "Aborting",

"BSH.Common.Setting.ChildLock" : "Kinderslot",
"BSH.Common.Setting.PowerState" : "Power State",

"BSH.Common.EnumType.PowerState.Off" : "Off",
"BSH.Common.EnumType.PowerState.On" : "On",
"BSH.Common.EnumType.PowerState.Standby" : "Standby",

"BSH.Common.Setting.TemperatureUnit" : "Temperature Units",

"BSH.Common.EnumType.TemperatureUnit.Celsius" : "Celsius",
"BSH.Common.EnumType.TemperatureUnit.Fahrenheit" : "Fahrenheit",

"BSH.Common.Status.DoorState" : "Door State",

"BSH.Common.EnumType.DoorState.Open" : "Open",
"BSH.Common.EnumType.DoorState.Closed" : "Closed",
"BSH.Common.EnumType.DoorState.Locked" : "Locked",

"BSH.Common.Status.LocalControlActive" : "Local Control Activation",
"BSH.Common.Status.RemoteControlActive": "Remote Control Activation",
"BSH.Common.Status.RemoteControlStartAllowed" : "Remote Control Allowed",

"BSH.Common.Root.ActiveProgram" : "Active Program",
"BSH.Common.Root.SelectedProgram" : "Selected Program",

"BSH.Common.Option.RemainingProgramTime" : "Remaining Program Time",
"BSH.Common.Option.ElapsedProgramTime" : "Elapsed Program Time",
"BSH.Common.Option.ProgramProgress" : "Program Progress",
"BSH.Common.Option.Duration" : "Program Duration",
"BSH.Common.Option.FinishInRelative" : "Finish In Relative",

"BSH.Common.Event.ProgramFinished" : "Program Finished",
"BSH.Common.Event.AlarmClockElapsed" : "Alarm Clock Elapsed",
"LaundryCare.Dryer.Event.DryingProcessFinished" : "Drying Process Finished",

"BSH.Common.EnumType.EventPresentState.Present" : "Event Present",
"BSH.Common.EnumType.EventPresentState.Off" : "Event Off",
"BSH.Common.EnumType.EventPresentState.Confirmed" : "Event Confirmed",

"LaundryCare.Dryer.Program.Cotton" : "Cotton",
"LaundryCare.Dryer.Program.Synthetic" : "Synthetic",
"LaundryCare.Dryer.Program.Mix" : "Mix Textiles",
"LaundryCare.Dryer.Program.Blankets" : "Blankets",
"LaundryCare.Dryer.Program.BusinessShirts" : "Business Shirts",
"LaundryCare.Dryer.Program.DownFeathers" : "Down Feathers",
"LaundryCare.Dryer.Program.Hygiene" : "Hygiene",
"LaundryCare.Dryer.Program.Jeans" : "Jeans",
"LaundryCare.Dryer.Program.Outdoor" : "Outdoor",
"LaundryCare.Dryer.Program.SyntheticRefresh" : "Synthetic Refresh",
"LaundryCare.Dryer.Program.Towels" : "Towels",
"LaundryCare.Dryer.Program.Delicates" : "Delicates",
"LaundryCare.Dryer.Program.Super40" : "Super 40'",
"LaundryCare.Dryer.Program.Shirts15" : "Shirts 15'",
"LaundryCare.Dryer.Program.Pillow" : "Pillow",
"LaundryCare.Dryer.Program.AntiShrink" : "Anti-Shrink",
"LaundryCare.Dryer.Program.WoolFinish" : "Wool",

"LaundryCare.Dryer.Program.MyTime.MyDryingTime" : "Variable Time",
"LaundryCare.Dryer.Program.TimeCold" : "Variable Time - Cold",
"LaundryCare.Dryer.Program.TimeWarm" : "Variable Time - Warm",
"LaundryCare.Dryer.Program.InBasket" : "Variable Time - In Basket",

"LaundryCare.Dryer.Program.TimeColdFix.TimeCold20" : "Fix Time 20'- Cold",
"LaundryCare.Dryer.Program.TimeColdFix.TimeCold30" : "Fix Time 30'- Cold",
"LaundryCare.Dryer.Program.TimeColdFix.TimeCold60" : "Fix Time 60'- Cold",
"LaundryCare.Dryer.Program.TimeWarmFix.TimeWarm30" : "Fix Time 30'- Warm",
"LaundryCare.Dryer.Program.TimeWarmFix.TimeWarm40" : "Fix Time 40'- Warm",
"LaundryCare.Dryer.Program.TimeWarmFix.TimeWarm60" : "Fix Time 60'- Warm",
"LaundryCare.Dryer.Program.Dessous" : "Dessous",

"LaundryCare.Dryer.Option.DryingTarget" : "Drying Target",

"LaundryCare.Dryer.EnumType.DryingTarget.IronDry" : "Iron Dry",
"LaundryCare.Dryer.EnumType.DryingTarget.CupboardDry" : "Cupboard Dry",
"LaundryCare.Dryer.EnumType.DryingTarget.CupboardDryPlus" : "Cupboard Dry Plus",

"LaundryCare.Washer.Option.SpinSpeed" : "Centrifugesnelheid",
"LaundryCare.Washer.Option.Temperature" : "Temperatuur",
"LaundryCare.Washer.Option.SpeedPerfect" : "SpeedPerfect",

"LaundryCare.Washer.Program.Cotton" : "Katoen",
"LaundryCare.Washer.Program.EasyCare" : "Kreukherstellend",
"LaundryCare.Washer.Program.Mix" : "Snel/Mix",
"LaundryCare.Washer.Program.DelicatesSilk" : "Fijn/Zijde",
"LaundryCare.Washer.Program.Wool" : "Wol",
"LaundryCare.Washer.Program.Outdoor" : "Outdoor",
"LaundryCare.Washer.Program.ShirtsBlouses" : "Overhemden",
"LaundryCare.Washer.Program.DarkWash" : "Jeans/Donkere was",
"LaundryCare.Washer.Program.Cotton.Eco4060" : "Eco 40-60",
"LaundryCare.Washer.Program.Cotton.Colour" : "Katoen Kleur",
"LaundryCare.Washer.Program.Super153045.Super1530" : "SuperKort 15/30",
"LaundryCare.Washer.Program.Rinse" : "Spoelen",
"LaundryCare.Washer.Program.Spin.SpinDrain" : "Centrifugeren/Afpompen",
"LaundryCare.Washer.Program.DrumClean" : "Trommel reinigen",

"LaundryCare.Washer.EnumType.SpinSpeed.Off" : "Uit",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM400" : "400 tpm",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM600" : "600 tpm",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM800" : "800 tpm",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM1000" : "1000 tpm",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM1200" : "1200 tpm",
"LaundryCare.Washer.EnumType.SpinSpeed.RPM1400" : "1400 tpm",

"LaundryCare.Washer.EnumType.Temperature.Cold" : "Koud",
"LaundryCare.Washer.EnumType.Temperature.GC20" : "20°C",
"LaundryCare.Washer.EnumType.Temperature.GC30" : "30°C",
"LaundryCare.Washer.EnumType.Temperature.GC40" : "40°C",
"LaundryCare.Washer.EnumType.Temperature.GC50" : "50°C",
"LaundryCare.Washer.EnumType.Temperature.GC60" : "60°C",
"LaundryCare.Washer.EnumType.Temperature.GC70" : "70°C",
"LaundryCare.Washer.EnumType.Temperature.GC80" : "80°C",
"LaundryCare.Washer.EnumType.Temperature.GC90" : "90°C",
"LaundryCare.Washer.EnumType.Temperature.Auto" : "Automatisch",

"Cooking.Oven.Program.HeatingMode.PreHeating" : "Voorverwarmen",
"Cooking.Oven.Program.HeatingMode.HotAir" : "Hete lucht",
"Cooking.Oven.Program.HeatingMode.HotAirEco" : "Hete lucht ECO",
"Cooking.Oven.Program.HeatingMode.HotAirGrilling" : "Hete lucht grillen",
"Cooking.Oven.Program.HeatingMode.TopBottomHeating" : "Onder-boven verwarmen",
"Cooking.Oven.Program.HeatingMode.TopBottomHeatingEco" : "Onder-boven ECO",
"Cooking.Oven.Program.HeatingMode.BottomHeating" : "Onder verwarmen",
"Cooking.Oven.Program.HeatingMode.PizzaSetting" : "Pizza",
"Cooking.Oven.Program.HeatingMode.SlowCook" : "Lanzaam koken",
"Cooking.Oven.Program.HeatingMode.IntensiveHeat" : "Intensieve warmte",
"Cooking.Oven.Program.HeatingMode.KeepWarm" : "Warmhouden",
"Cooking.Oven.Program.HeatingMode.PreheatOvenware" : "Verwarm de oven voor",
"Cooking.Oven.Program.HeatingMode.FrozenHeatupSpecial" : "Bevroren opwarmen",
"Cooking.Oven.Program.HeatingMode.Desiccation" : "Uitdroging",
"Cooking.Oven.Program.HeatingMode.Defrost" : "Ontdooien",
"Cooking.Oven.Program.HeatingMode.Proof" : "Rijzen",

"ConsumerProducts.CoffeeMaker.Status.BeverageCounterCoffee" : "Koffie aantal",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterCoffeeAndMilk" : "Koffie met melk aantal",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterRistrettoEspresso" : "Espresso aantal",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterFrothyMilk" : "Melkschuim aantal",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterHotMilk" : "Warme Melk aantal",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterHotWater" : "Warm Water",
"ConsumerProducts.CoffeeMaker.Status.BeverageCounterPowderCoffee" : "Poeder koffie aantal",

"ConsumerProducts.CoffeeMaker.Program.Beverage.Ristretto" : "Ristretto",
"ConsumerProducts.CoffeeMaker.Program.Beverage.Espresso" : "Espresso",
"ConsumerProducts.CoffeeMaker.Program.Beverage.EspressoDoppio" : "Espresso Doppio",
"ConsumerProducts.CoffeeMaker.Program.Beverage.Coffee" : "Koffie zwart",
"ConsumerProducts.CoffeeMaker.Program.Beverage.XLCoffee" : "Koffie XL",

"ConsumerProducts.CoffeeMaker.Program.Beverage.EspressoMacchiato" : "Espresso Macchiato",
"ConsumerProducts.CoffeeMaker.Program.Beverage.Cappuccino" : "Cappuccino",
"ConsumerProducts.CoffeeMaker.Program.Beverage.LatteMacchiato" : "Latte Macchiato",
"ConsumerProducts.CoffeeMaker.Program.Beverage.CaffeLatte" : "Koffie Verkeerd",

"ConsumerProducts.CoffeeMaker.Program.Beverage.MilkFroth" : "Melkschuim",
"ConsumerProducts.CoffeeMaker.Program.Beverage.WarmMilk" : "Warme melk",
"ConsumerProducts.CoffeeMaker.Program.Beverage.CoffeePot" : "Koffiepot",
"ConsumerProducts.CoffeeMaker.Program.Beverage.HotWater" : "Heet Water",

"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.KleinerBrauner" : "Kleiner Brauner",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.GrosserBrauner" : "Großer Brauner",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Verlaengerter" : "Verlängerter",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.VerlaengerterBraun" : "Verlängerter Braun",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.WienerMelange" : "Wiener Melange",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.FlatWhite" : "Flat White",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Cortado" : "Cortado",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeCortado" : "Cafe Cortado",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeConLeche" : "Cafe Con Leche",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeAuLait" : "Cafe Au Lait",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Doppio" : "Doppio",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Kaapi" : "Kaapi",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.KoffieVerkeerd" : "Koffie Verkeerd",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Galao" : "Galão",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Garoto" : "Garoto",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Americano" : "Americano",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.RedEye" : "Red Eye",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.BlackEye" : "Black Eye",
"ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.DeadEye" : "Dead Eye",

"ConsumerProducts.CoffeeMaker.Setting.CupWarmer" : "Kopjesverwarmer",
"ConsumerProducts.CoffeeMaker.Program.CleaningModes.ApplianceOnRinsing" : "Reinigen en Spoelen",
"ConsumerProducts.CoffeeMaker.Program.CleaningModes.ApplianceOffRinsing" : "Spoelen en Slapen!",
"ConsumerProducts.CoffeeMaker.Program.CleaningModes.RinseMilkSystem" : "Spoelen Melksysteem",
"ConsumerProducts.CoffeeMaker.Event.BeanContainerEmpty" : "Bonenreservoir leeg",
"ConsumerProducts.CoffeeMaker.Event.DripTrayFull" : "Lekbak vol",
"ConsumerProducts.CoffeeMaker.Event.WaterTankEmpty" : "Waterreservoir Leeg",

"ConsumerProducts.CoffeeMaker.Option.BeanAmount" : "Hoeveelheid bonen",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.VeryMild" : "Slappe bak",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.Mild" : "Mild",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.MildPlus" : "Mild +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.Normal" : "Normaal",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.NormalPlus" : "Normaal +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.Strong" : "Sterk",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.StrongPlus" : "Sterk +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.VeryStrong" : "Heel sterk",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.VeryStrongPlus" : "Heel sterk +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.ExtraStrong" : "Extra sterk",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.DoubleShot" : "DoubleShot",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.DoubleShotPlus" : "DoubleShot +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.DoubleShotPlusPlus" : "DoubleShot ++",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.TripleShot" : "TripleShot",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.TripleShotPlus" : "TripleShot +",
"ConsumerProducts.CoffeeMaker.EnumType.BeanAmount.CoffeeGround" : "Coffee Ground",
"ConsumerProducts.CoffeeMaker.Option.FillQuantity" : "Vulhoeveelheid",
"ConsumerProducts.CoffeeMaker.Option.CoffeeTemperature" : "Koffie temperatuur",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.88C" : "88 °C",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.90C" : "90 °C",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.92C" : "92 °C",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.94C" : "94 °C",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.95C" : "95 °C",
"ConsumerProducts.CoffeeMaker.EnumType.CoffeeTemperature.96C" : "96 °C",
"ConsumerProducts.CoffeeMaker.Option.BeanContainerSelection" : "Koffieboon selectie",
"ConsumerProducts.CoffeeMaker.EnumType.BeanContainerSelection.Right" : "Rechter container",
"ConsumerProducts.CoffeeMaker.EnumType.BeanContainerSelection.Left" : "Linker container",
"ConsumerProducts.CoffeeMaker.Option.FlowRate" : "Stroomsnelheid",
"ConsumerProducts.CoffeeMaker.EnumType.FlowRate.Normal" : "Normaal",
"ConsumerProducts.CoffeeMaker.EnumType.FlowRate.Intense" : "Intense",
"ConsumerProducts.CoffeeMaker.EnumType.FlowRate.IntensePlus" : "IntensePlus",
"ConsumerProducts.CoffeeMaker.Option.MultipleBeverages" : "Dubbele uitgifte",

}`

Mitch73-2 commented 3 years ago

I really like the cards you maked. Is there any possibility that you can share the cards for Home Assistant.

thorschtn commented 3 years ago

Really great idea, I would really appreciate it.

There might be some more options.

At least for the Washer:

"LaundryCare.Washer.Option.IDos2.Active" "LaundryCare.Washer.Option.IDos1.Active" "LaundryCare.Washer.Option.Prewash" "LaundryCare.Washer.Option.RinsePlus"

SantaFox commented 3 years ago

Can you please send a part of the log with IDos options? My machine uses IDos but these options were unavailable…

On Tue, 17 Aug 2021 at 19:35, thorschtn @.***> wrote:

Really great idea, I would really appreciate it.

There might be some more options.

At least for the Washer:

"LaundryCare.Washer.Option.IDos2.Active" "LaundryCare.Washer.Option.IDos1.Active" "LaundryCare.Washer.Option.Prewash" "LaundryCare.Washer.Option.RinsePlus"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DavidMStraub/homeassistant-homeconnect/issues/131#issuecomment-900450856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJ246AUI6AYHSX27GILQ3T5KFURANCNFSM5A2KUFXA .

-- Sent from Gmail iPad

Mitch73-2 commented 3 years ago

Let's hope the branche of SantaFox gets integrated soon

DavidMStraub commented 3 years ago

Just to be clear, I currently don't have the time to look at forks and port features. If somebody raises a pull request, I am willing to review and merge them.

If you have a new feature, you are of course also always welcome to directly submit a PR to HA core.