GithubHelp home page GithubHelp logo

asyncsleepiq's People

Contributors

claybenson94 avatar dzader avatar jmwaldrip avatar kbickar avatar mfugate1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asyncsleepiq's Issues

Support Climate360 Model

Per home-assistant/core#90334, I think this library doesn't currently support the Climate360 Model

I have this model, and am willing to help debug! I have the library set up locally and am able to query the API with my credentials. I am doing a bit of reverse engineering (as I'm sure you've already done yourself) on what needs to be done to get this model to work!

Add better light support

Thanks for the foundation changes @mfugate1 Mine doesn't have/support the foundation so I find it a little difficult to test it - does yours have the lights? If so, can you test the following code at the end of the example:

    print("Available lights:")
    for light in bed.foundation.lights:
        print(f" - {light}: {bed.foundation.lights[light]}")
        
    print("Turning on lights...")
    for light in bed.foundation.lights:
        bed.foundation.set_light(light, True)
        bed.foundation.fetch_light(light)
        print(f" {light}: {bed.foundation.lights[light]}")
        await asyncio.sleep(1)
    await asyncio.sleep(10)
    print("Turning off lights...")
    for light in bed.foundation.lights:
        bed.foundation.set_light(light, False)
        bed.foundation.fetch_light(light)
        print(f" {light}: {bed.foundation.lights[light]}")
        await asyncio.sleep(1)

    status = await bed.foundation.foundation_status()
    print(f"Foundation status: {status}")
    print(f"Features: {bed.foundation.features}")

If the above works, it would be good to create a new light object which could then be more easily referenced to turn on/off

Issue with splitHead Foundation control

I was excited about the integration with Home Assistant (as I had manually created a way to control the Foundation aspect of my SleepNumber bed inside of Home Assistant but it was clunky). And excellent work btw!

However, when I added my bed, it was missing control of the Left/Head side of our bed (number.sleepnumber_our_bed_left_head_position was missing).

So, I started digging into your API and discovered that it was only returning 3 actuators (None/Head, Right/Head, and None/Foot). It appeared that Left/Head was missing.

I am not a very good coder, but I modified the Foundation.py file:

` async def init_actuators(self, data: dict[str, Any]) -> None:
"""Initialize list of actuators available on foundation."""
self.is_moving = data["fsIsMoving"]

    if self.type in ["single", "easternKing"]:
        self.actuators = [
            SleepIQActuator(self._api, self.bed_id, None, 0),
            SleepIQActuator(self._api, self.bed_id, None, 1),
        ]
        self.presets = [SleepIQPreset(self._api, self.bed_id, 0)]
    elif self.type == "splitHead":
        self.actuators = [
            SleepIQActuator(self._api, self.bed_id, 0, 0),
            SleepIQActuator(self._api, self.bed_id, 1, 0),
	**SleepIQActuator(self._api, self.bed_id, 2, 0),**
            SleepIQActuator(self._api, self.bed_id, None, 1),
        ]
    else:
        self.actuators = [
            SleepIQActuator(self._api, self.bed_id, 0, 0),
            SleepIQActuator(self._api, self.bed_id, 1, 0),
            SleepIQActuator(self._api, self.bed_id, 0, 1),
            SleepIQActuator(self._api, self.bed_id, 1, 1),
        ]

    await self.update_actuators(data)`

Then I modified const.py to include the "None" side:

SIDES = ["None", "L", "R"] SIDES_FULL = ["None", "Left", "Right"]

This seems to have fixed it within Home Assistant (as well as my local python instance). However, I have no idea if this makes sense or all changes were required. Let me know if I can provide additional details.

Footwarmer Control

Hubitat has control of the SleepIQ footwarmers in its integration. I would be willing to test a HA integration that has control of footwarmers entities.

Feature Request: Climate Controls for Climate360 Bed

I would like to add support for the cooling/warming functionality of the Cloud360 bed within the library to be utilized with Home Assistant.

I am willing to contribute development time and testing time if this is a feature you're willing to add to the library.

Thank you!

Foot Warmer Time Range

Hey there!

I noticed in fuzion/foot_warmer.py and foot_warmer.py that the time range is limited to 360 minutes (6 hours), but the app will allow you to set it to 600 minutes (10 hours).

        if time <= 0 or time > 360:
            raise ValueError("Invalid Time, must be between 0 and 360")

I am curious if that is on purpose?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.