Skip to content

Instantly share code, notes, and snippets.

"""
Support for Netatmo Smart thermostats.
For Home Assistant >=0.89.
THIS FILE GOES TO config/custom_components/netatmo/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.const import (
@shanbs
shanbs / climate.py
Last active February 27, 2019 20:41
"""
Support for Netatmo Smart thermostats.
For Home Assistant >=0.88.
THIS FILE GOES TO config/custom_components/netatmo/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.const import (
"""
Support for the Netatmo devices.
For Home Assistant >=0.88.
THIS FILE GOES TO config/custom_components/netatmo/
"""
import logging
from datetime import timedelta
from urllib.error import HTTPError
import voluptuous as vol
"""
coding=utf-8
"""
import time
from . import NoDevice, postRequest, _BASE_URL
_SETTEMP_REQ = _BASE_URL + "api/setthermpoint"
_GETTHERMOSTATDATA_REQ = _BASE_URL + "api/getthermostatsdata"
_GETHOMESDATA_REQ = _BASE_URL + "api/homesdata"
#This code sample uses requests (HTTP library)
import requests
from sys import version_info
import json
import sys
# HTTP libraries depends upon Python 2 or 3
if version_info.major == 3 :
import urllib.parse, urllib.request
else:
@shanbs
shanbs / netatmo.py
Last active February 13, 2019 13:25
Custom component Netatmo ready for supporting multiple thermostats/valves
"""
Support for the Netatmo devices.
THIS FILE GOES TO config/custom_components/
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/netatmo/
"""
import logging
from datetime import timedelta
from urllib.error import HTTPError
@shanbs
shanbs / netatmo.py
Last active February 13, 2019 13:26
Custom climate component for Netatmo, supporting multiple thermostats/valves.
"""
Support for Netatmo Smart Thermostat.
THIS FILE GOES TO config/custom_components/climate/
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.netatmo/
"""
import logging
from datetime import timedelta
@shanbs
shanbs / netatmo2.py
Last active February 15, 2019 11:14 — forked from gieljnssns/netatmo2.py
Custom climate component for testing new Netatmo Energy API on HA +0.72
"""
Support for Netatmo Smart Thermostat.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.netatmo/
"""
import logging
from datetime import timedelta
import voluptuous as vol