Skip to content

Instantly share code, notes, and snippets.

cgtobi cgtobi

  • Germany
Block or report user

Report or block cgtobi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cgtobi
cgtobi / remote_debugging_ha_vscode.md
Last active Apr 23, 2019
Remote debugging Home Assistant with VSCode
View remote_debugging_ha_vscode.md

Prerequisits

Local machine

  • Python 3 environment
  • VSCode 1.33.1 with Python 2019.3.6558
  • sshfs

Remote machine

  • Full development environment for Home Assistant
  • ptvsd
@cgtobi
cgtobi / HASS_data_science.md
Last active Dec 28, 2018
Getting HASS data science lab up and running on Ubuntu 18.10.
View HASS_data_science.md

Installation

Starting with a fresh Ubuntu 18.10.

sudo apt update
sudo apt upgrade
sudo apt install python3-pip
sudo pip3 install jupyterlab
sudo pip3 install HASS-data-detective
sudo pip3 install homeassistant
View jupyterlab.service
[Unit]
Description=Jupyter Lab
[Service]
User=ubuntu
Type=simple
ExecStart=/usr/local/bin/jupyter lab --port 8888 --ip=0.0.0.0
WorkingDirectory=/home/ubuntu/Notebook
[Install]
@cgtobi
cgtobi / netatmo2.py
Last active Nov 22, 2018 — forked from gieljnssns/netatmo2.py
Custom climate component for testing new Netatmo Energy API on HA +0.72
View netatmo2.py
"""
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
from homeassistant.const import TEMP_CELSIUS, ATTR_TEMPERATURE
@cgtobi
cgtobi / modbus.py
Created Oct 31, 2018
Modbus Climate
View modbus.py
"""
Platform for a Generic Modbus Thermostat.
This uses a setpoint and process
value within the controller, so both the current temperature register and the
target temperature register need to be configured.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.modbus/
"""
@cgtobi
cgtobi / rmv-card.js
Last active Aug 20, 2018
Custom card for lovelace ui
View rmv-card.js
class RmvCard extends HTMLElement {
set hass (hass) {
const entityId = this.config.entity
const state = hass.states[entityId]
const name = state.attributes['friendly_name']
if (!this.content) {
const card = document.createElement('ha-card')
card.header = name
this.content = document.createElement('div')
You can’t perform that action at this time.