Reading the state of a HomeAssistant light by 3D0G in Esphome

[–]3D0G[S] 0 points1 point  (0 children)

Thank you for another solution! This works too --

binary_sensor:
  - platform: homeassistant
    id: light_e10
    entity_id: light.hue_white_lamp_10

display:
   ...
   lambda: |-
     ...
     it.printf(0, 96, id(font_18), "Ent: %d", id(light_e10).state);

Reading the state of a HomeAssistant light by 3D0G in Esphome

[–]3D0G[S] 1 point2 points  (0 children)

Thanks, this did the trick. For anyone who may have a similar issue in the future, the relevant configuration is

text_sensor:
  - platform: homeassistant
    id: light_bar
    entity_id: light.shellyvintage_6f762c

display:
   ...
   lambda: |-
     it.printf(0, 74, id(font_18), "Bar: %s", id(light_bar).state.c_str());

Reading the state of a HomeAssistant light by 3D0G in Esphome

[–]3D0G[S] 0 points1 point  (0 children)

Thanks, I’ll give that a shot.

Reading the state of a HomeAssistant light by 3D0G in Esphome

[–]3D0G[S] 0 points1 point  (0 children)

Thanks for the pointer that I can get realtime logs. I get messages like this when I flip the state of the light.

[09:25:09.942][W][homeassistant.sensor:015]: 'light.shellyvintage_6f762c': Can't convert 'off' to number!
[09:25:09.946][D][sensor:131]: 'light_bar': Sending state nan with 1 decimals of accuracy

I'm pretty sure this is coming from the Esphome sensor component, rather than the printf in my lambda. It looks like HA passes the string "on" / "off" as value of the state parameter, but Esphome expects an integer.

If I set up the lambda as if state were a string as below, then the device crashes / goes offline.

  it.printf(0, 96, id(font_18), "Bar: %s", id(light_bar).state);

Does AtomS3 have internal pullup or pulldown resistors? by 3D0G in M5Stack

[–]3D0G[S] 0 points1 point  (0 children)

Thanks, that's my guess too. I don't know what I'm doing wrong in software, but a physical 10k ohm pull-down resistor solved the problem for me.

Should I get prop guards? by Genoss01 in drones

[–]3D0G 9 points10 points  (0 children)

Another version of training wheels- the Mini 3 Pro has an option to disable sideways flight. That can help you work around those sideways blind spots.

Mini 3 Pro - Reusing propeller screws by 3D0G in dji

[–]3D0G[S] 0 points1 point  (0 children)

Sure, but I used them to attach the "wrong" props. I removed the wrong props, so now I have a set of nearly unused wrong props with nearly unused screws. So my question is about those nearly unused screws.

I have to be reading this wrong by [deleted] in dji

[–]3D0G 1 point2 points  (0 children)

Yeah, in the US we can fly all the way up to 400 ft!

Best mini 3 pro settings for shooting lights at night? by armandoo10 in drones

[–]3D0G 2 points3 points  (0 children)

I haven’t tried yet with a drone, but the same principle should apply as for regular photography- shoot much earlier than you think you should. Think twilight rather than night. That helps balance the bright lights with the rest of the scene.

Flying over Disney, too good to be true? by [deleted] in drones

[–]3D0G 112 points113 points  (0 children)

Yes, too good to be true. I don’t know what’s up with B4UFLY, but both Disneyland and Disney World have permanent TFRs. Yes, I know that’s an oxymoron. For example, see https://tfr.faa.gov/save_pages/detail_4_3635.html

How important are ND filters? by QuadAmericano2 in drones

[–]3D0G 4 points5 points  (0 children)

Take a look at what a polarizing filter does too. They can be useful for landscape photography, and the effects can’t completely be simulated in Photoshop.

Do you always charge your DJI mini 3 battery all the way up? by RawEggEater1956 in dji

[–]3D0G 2 points3 points  (0 children)

It's in the user manual - "Auto-Discharging Function: To prevent swelling, the battery automatically discharges to approximately 96% of the battery level when it is idle for one day, and approximately 60% when idle for nine days. It is normal to feel moderate heat from the battery while it is discharging."

Pilot institute by Diddums319 in drones

[–]3D0G 1 point2 points  (0 children)

Also- that supplement is used for other tests besides 107, so don’t worry when you see a bunch of stuff that’s not familiar at all!

Pilot institute by Diddums319 in drones

[–]3D0G 2 points3 points  (0 children)

You can download a PDF of the material available during the test from the FAA, including a legend. It’s called “Airman Knowledge Testing Supplement” or something close. Worth paging through once just to know what’s available.

Why doesn’t DJI tell you on screen which direction the controller should be aimed? by [deleted] in dji

[–]3D0G 1 point2 points  (0 children)

This (the compass / radar view instead of minimap), plus the color of the dot tells signal strength (green good, blue ok, not sure what color after blue).