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
sudo apt-get update | |
sudo apt-get upgrade | |
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - | |
echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list | |
sudo apt-get update | |
sudo apt-get install influxdb |
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
var on_ladder = false | |
func _physics_process(delta): | |
var tilemap = get_parent().get_node("TileMap") | |
if not tilemap == null: | |
var map_pos = tilemap.world_to_map(position) | |
var id = tilemap.get_cellv(map_pos) | |
if id > -1: | |
if tilemap.get_tileset().tile_get_name(id) == "ladder": |
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
extends Node2D | |
export (PackedScene) var Star | |
signal star_was_taken | |
export (int) var total_stars = 0 | |
export (int) var stars_found = 0 | |
func _ready(): |
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
extends Area2D | |
signal player_hit | |
var path = null | |
var prevX = 0 | |
var pathIdx = 0 | |
var speed = 0 | |
var direction = 0 |
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
extends Node2D | |
export (PackedScene) var Bat | |
func _ready(): | |
for i in range(0,10): | |
var bat = Bat.instance() | |
bat.path = $BatPath/PathFollow2D | |
bat.connect("player_hit", self, "on_player_hit") | |
add_child(bat) |
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
extends Area2D | |
signal star_taken | |
func _on_Area2D_body_entered( body ): | |
if (not body.get("is_player") == null): | |
$CollisionPolygon2D.disabled = true | |
hide() | |
emit_signal("star_taken") | |
queue_free() |
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
extends Node2D | |
export (PackedScene) var Star | |
export (int) var total_stars = 0 | |
export (int) var stars_found = 0 | |
func _ready(): | |
var pos_curve = $ItemPositions.get_curve() | |
total_stars = pos_curve.get_point_count() |
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
customize: | |
sensor.porch_temp: | |
friendly_name: Porch temperature | |
icon: mdi:thermometer | |
sensor.outdoor_temp: | |
friendly_name: Temperature | |
icon: mdi:thermometer | |
sensor.outdoor_humidity: | |
friendly_name: Humidity | |
icon: mdi:water-percent |
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
sensor: | |
- platform: template | |
sensors: | |
porch_last_motion: | |
friendly_name: 'Porch last motion' | |
icon_template: mdi:walk | |
value_template: '{{ as_timestamp(states.sensor.porch_motion.last_updated) | timestamp_custom("%a %H:%M", True) }}' |
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
sensor: | |
- platform: mqtt | |
state_topic: "Home/Porch/Temperature" | |
name: porch_temp | |
unit_of_measurement: "°C" | |
- platform: mqtt | |
state_topic: "Home/Outdoor/Temperature" | |
name: outdoor_temp | |
unit_of_measurement: "°C" | |
- platform: mqtt |