GithubHelp home page GithubHelp logo

jcgoette / hi_mama_homeassistant Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 20 KB

This custom integration provides sensors for HiMama data points.

License: MIT License

Python 100.00%
baby home-assistant home-assistant-component home-assistant-custom home-assistant-sensor parents python

hi_mama_homeassistant's People

Contributors

jcgoette avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

00mjk viper5000

hi_mama_homeassistant's Issues

How does one find the child ID?

I would like to use the integration you have created but I can't figure out the child ID

I tried 0 and 1 with no luck. If it's a UUID or something I'm not sure where to find it. Any advise would be great.

Thanks

needs refactor

needs refactor

        for h2 in response_h2:
            h2_text = h2.get_text(strip=True)
            h2_next_siblings = h2.next_sibling.contents
            # TODO: needs refactor
            if "Preview" in h2_text:
                child_dict["At Daycare"] = True
            if "Preview" not in h2_text:
                if "Report" in h2_text:
                    if i == 0:

2867e48f45ab941cf9dfad7657430cb2979048fb

move to binary_sensor

move to binary_sensor

# TODO: move to binary_sensor

        """Query HiMama for data."""
        pymama_data = pymama_query(self._email, self._password, self._child_id)
        pymama_latest = pymama_data.get("Latest")
        # TODO: move to binary_sensor
        pymama_latest["At Daycare"] = pymama_data.get("At Daycare")
        return pymama_latest

39d75dacff7498a59505d4f3d87484da43ae9313

needs refactor

needs refactor

        response = BeautifulSoup(response, "html.parser")

        response_h2 = response.find_all("h2")
        for i2, h2 in enumerate(response_h2):
            h2_text = h2.get_text(strip=True)
            h2_next_siblings = h2.next_sibling.contents
            # TODO: needs refactor
            if i == 0 and i2 == 0:
                child_dict["At Daycare"] = True if "Preview" in h2_text else False
            if "Preview" not in h2_text:
                if "Report" in h2_text:
                    if i == 0:

ccf7eb59152b4f6bb47c201dc0208a993268637b

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.