This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
climate: | |
- platform: smart_thermostat | |
name: Olohuone Smart Thermostat | |
unique_id: olohuone_smart_thermostat | |
# target input_number has been created manually in Settings -> Devices & services -> Helpers | |
heater: input_number.olohuone_smart_thermostat_valve_state | |
target_sensor: sensor.olohuone_pvvx_temperature | |
min_temp: 10 | |
max_temp: 24 | |
ac_mode: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's say you have a user with id "XXX" and you want to get all the | |
# groups that user is a member of. The query below should do the trick. | |
# | |
# However, when implementing the query and the types with Strawberry, | |
# it becomes essential that the groups relay connection has access to the | |
# user id. This is a hassle in Strawberry because the information is only | |
# available in the abstract syntax tree that you have to traverse | |
# manually. | |
# | |
# The code in this gist shows how to do that. It's not pretty, but it works. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import iterm2 | |
import AppKit | |
import click | |
import os | |
@click.command() | |
@click.argument( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// wire up a DS18B20 (OneWire device) | |
DallasTemperatureSensors* dts = new DallasTemperatureSensors(ONEWIRE_DQ_PIN); | |
uint onewire_read_delay = 500; | |
auto* onewire_temp = | |
new OneWireTemperature(dts, onewire_read_delay, "/temperature/oneWire"); | |
onewire_temp->connect_to( |